diff options
author | Aleksey Kladov <[email protected]> | 2018-08-22 09:56:36 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-22 09:56:36 +0100 |
commit | 641659d5a8dcca0b8a1c36ff6d1c517a91296116 (patch) | |
tree | 8ed23d27c1839d525cd69be56bbba2fb6cf52598 /crates/libsyntax2/src | |
parent | 9909875bfe89d2b901c35c0667bed018338b44e1 (diff) |
Smarter extend selection
Diffstat (limited to 'crates/libsyntax2/src')
-rw-r--r-- | crates/libsyntax2/src/ast/generated.rs | 18 |
1 files changed, 18 insertions, 0 deletions
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 | |||