diff options
author | veetaha <[email protected]> | 2020-05-10 17:11:22 +0100 |
---|---|---|
committer | veetaha <[email protected]> | 2020-05-10 17:11:22 +0100 |
commit | 7a49165f5d5c8186edd04f874eae8a98e39d3df6 (patch) | |
tree | 9e01929e1ef5014c14cf76eca8b41508659fe4d9 /crates/ra_syntax/src/ast | |
parent | 258a3461b428efa0b8cc8fcd40c7844a8ce22406 (diff) |
Remove MacroStmts as per edwin0cheng
Diffstat (limited to 'crates/ra_syntax/src/ast')
-rw-r--r-- | crates/ra_syntax/src/ast/generated/nodes.rs | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 4bcdbd495..7de20bff7 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs | |||
@@ -2469,22 +2469,6 @@ pub struct MacroItems { | |||
2469 | } | 2469 | } |
2470 | impl ast::ModuleItemOwner for MacroItems {} | 2470 | impl ast::ModuleItemOwner for MacroItems {} |
2471 | impl MacroItems {} | 2471 | impl MacroItems {} |
2472 | /// Macro statements is a node that holds an statements created by expanding a macro. | ||
2473 | /// | ||
2474 | /// ``` | ||
2475 | /// foo!(); // expands into some statements -v | ||
2476 | /// // ❰ foo_crate::bar(); ❱ | ||
2477 | /// ``` | ||
2478 | /// | ||
2479 | /// [Reference](https://doc.rust-lang.org/reference/macros.html) | ||
2480 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
2481 | pub struct MacroStmts { | ||
2482 | pub(crate) syntax: SyntaxNode, | ||
2483 | } | ||
2484 | impl MacroStmts { | ||
2485 | pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) } | ||
2486 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | ||
2487 | } | ||
2488 | /// List of items in an extern block. | 2472 | /// List of items in an extern block. |
2489 | /// | 2473 | /// |
2490 | /// ``` | 2474 | /// ``` |
@@ -4041,17 +4025,6 @@ impl AstNode for MacroItems { | |||
4041 | } | 4025 | } |
4042 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 4026 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
4043 | } | 4027 | } |
4044 | impl AstNode for MacroStmts { | ||
4045 | fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_STMTS } | ||
4046 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
4047 | if Self::can_cast(syntax.kind()) { | ||
4048 | Some(Self { syntax }) | ||
4049 | } else { | ||
4050 | None | ||
4051 | } | ||
4052 | } | ||
4053 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
4054 | } | ||
4055 | impl AstNode for ExternItemList { | 4028 | impl AstNode for ExternItemList { |
4056 | fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_ITEM_LIST } | 4029 | fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_ITEM_LIST } |
4057 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 4030 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -5484,11 +5457,6 @@ impl std::fmt::Display for MacroItems { | |||
5484 | std::fmt::Display::fmt(self.syntax(), f) | 5457 | std::fmt::Display::fmt(self.syntax(), f) |
5485 | } | 5458 | } |
5486 | } | 5459 | } |
5487 | impl std::fmt::Display for MacroStmts { | ||
5488 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
5489 | std::fmt::Display::fmt(self.syntax(), f) | ||
5490 | } | ||
5491 | } | ||
5492 | impl std::fmt::Display for ExternItemList { | 5460 | impl std::fmt::Display for ExternItemList { |
5493 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | 5461 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { |
5494 | std::fmt::Display::fmt(self.syntax(), f) | 5462 | std::fmt::Display::fmt(self.syntax(), f) |