diff options
Diffstat (limited to 'crates/libsyntax2')
-rw-r--r-- | crates/libsyntax2/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/libsyntax2/src/ast/generated.rs | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/crates/libsyntax2/Cargo.toml b/crates/libsyntax2/Cargo.toml index b55cdf481..e8810046a 100644 --- a/crates/libsyntax2/Cargo.toml +++ b/crates/libsyntax2/Cargo.toml | |||
@@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | |||
6 | 6 | ||
7 | [dependencies] | 7 | [dependencies] |
8 | unicode-xid = "0.1.0" | 8 | unicode-xid = "0.1.0" |
9 | text_unit = "0.1.2" | 9 | text_unit = "0.1.3" |
10 | itertools = "0.7.8" | 10 | itertools = "0.7.8" |
11 | drop_bomb = "0.1.4" | 11 | drop_bomb = "0.1.4" |
12 | parking_lot = "0.6.0" | 12 | parking_lot = "0.6.0" |
diff --git a/crates/libsyntax2/src/ast/generated.rs b/crates/libsyntax2/src/ast/generated.rs index 610b5198c..0651da26d 100644 --- a/crates/libsyntax2/src/ast/generated.rs +++ b/crates/libsyntax2/src/ast/generated.rs | |||
@@ -641,3 +641,21 @@ impl<'a> AstNode<'a> for TypeRef<'a> { | |||
641 | 641 | ||
642 | impl<'a> TypeRef<'a> {} | 642 | impl<'a> TypeRef<'a> {} |
643 | 643 | ||
644 | // Whitespace | ||
645 | #[derive(Debug, Clone, Copy)] | ||
646 | pub struct Whitespace<'a> { | ||
647 | syntax: SyntaxNodeRef<'a>, | ||
648 | } | ||
649 | |||
650 | impl<'a> AstNode<'a> for Whitespace<'a> { | ||
651 | fn cast(syntax: SyntaxNodeRef<'a>) -> Option<Self> { | ||
652 | match syntax.kind() { | ||
653 | WHITESPACE => Some(Whitespace { syntax }), | ||
654 | _ => None, | ||
655 | } | ||
656 | } | ||
657 | fn syntax(self) -> SyntaxNodeRef<'a> { self.syntax } | ||
658 | } | ||
659 | |||
660 | impl<'a> Whitespace<'a> {} | ||
661 | |||