aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast/generated
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/ast/generated')
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index 7b236cd52..5dad028c7 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -2491,6 +2491,22 @@ pub struct MacroItems {
2491} 2491}
2492impl ast::ModuleItemOwner for MacroItems {} 2492impl ast::ModuleItemOwner for MacroItems {}
2493impl MacroItems {} 2493impl MacroItems {}
2494/// FIXME: (@edwin0cheng) add some documentation here. As per the writing
2495/// of this comment this ast node is not used.
2496///
2497/// ```
2498/// // FIXME: example here
2499/// ```
2500///
2501/// [Reference](https://doc.rust-lang.org/reference/macros.html)
2502#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2503pub struct MacroStmts {
2504 pub(crate) syntax: SyntaxNode,
2505}
2506impl MacroStmts {
2507 pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) }
2508 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2509}
2494/// List of items in an extern block. 2510/// List of items in an extern block.
2495/// 2511///
2496/// ``` 2512/// ```
@@ -4047,6 +4063,17 @@ impl AstNode for MacroItems {
4047 } 4063 }
4048 fn syntax(&self) -> &SyntaxNode { &self.syntax } 4064 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4049} 4065}
4066impl AstNode for MacroStmts {
4067 fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_STMTS }
4068 fn cast(syntax: SyntaxNode) -> Option<Self> {
4069 if Self::can_cast(syntax.kind()) {
4070 Some(Self { syntax })
4071 } else {
4072 None
4073 }
4074 }
4075 fn syntax(&self) -> &SyntaxNode { &self.syntax }
4076}
4050impl AstNode for ExternItemList { 4077impl AstNode for ExternItemList {
4051 fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_ITEM_LIST } 4078 fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_ITEM_LIST }
4052 fn cast(syntax: SyntaxNode) -> Option<Self> { 4079 fn cast(syntax: SyntaxNode) -> Option<Self> {
@@ -5479,6 +5506,11 @@ impl std::fmt::Display for MacroItems {
5479 std::fmt::Display::fmt(self.syntax(), f) 5506 std::fmt::Display::fmt(self.syntax(), f)
5480 } 5507 }
5481} 5508}
5509impl std::fmt::Display for MacroStmts {
5510 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5511 std::fmt::Display::fmt(self.syntax(), f)
5512 }
5513}
5482impl std::fmt::Display for ExternItemList { 5514impl std::fmt::Display for ExternItemList {
5483 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 5515 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5484 std::fmt::Display::fmt(self.syntax(), f) 5516 std::fmt::Display::fmt(self.syntax(), f)