aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-22 09:56:36 +0100
committerAleksey Kladov <[email protected]>2018-08-22 09:56:36 +0100
commit641659d5a8dcca0b8a1c36ff6d1c517a91296116 (patch)
tree8ed23d27c1839d525cd69be56bbba2fb6cf52598 /crates/libsyntax2/src
parent9909875bfe89d2b901c35c0667bed018338b44e1 (diff)
Smarter extend selection
Diffstat (limited to 'crates/libsyntax2/src')
-rw-r--r--crates/libsyntax2/src/ast/generated.rs18
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
642impl<'a> TypeRef<'a> {} 642impl<'a> TypeRef<'a> {}
643 643
644// Whitespace
645#[derive(Debug, Clone, Copy)]
646pub struct Whitespace<'a> {
647 syntax: SyntaxNodeRef<'a>,
648}
649
650impl<'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
660impl<'a> Whitespace<'a> {}
661