diff options
author | Aleksey Kladov <[email protected]> | 2018-08-30 18:03:18 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-30 18:03:18 +0100 |
commit | 49e14a99ed4d0baf849bbd5766f6c16e7d37930c (patch) | |
tree | 080b101c51c4f2c5921ee14000950abd65917994 /crates/libsyntax2 | |
parent | 9fcebbc51284408203c05219a0ee92519f51ea74 (diff) |
Complete types
Diffstat (limited to 'crates/libsyntax2')
-rw-r--r-- | crates/libsyntax2/src/ast/generated.rs | 18 | ||||
-rw-r--r-- | crates/libsyntax2/src/grammar.ron | 3 |
2 files changed, 20 insertions, 1 deletions
diff --git a/crates/libsyntax2/src/ast/generated.rs b/crates/libsyntax2/src/ast/generated.rs index d72e2091a..c2a22c8fc 100644 --- a/crates/libsyntax2/src/ast/generated.rs +++ b/crates/libsyntax2/src/ast/generated.rs | |||
@@ -1278,6 +1278,24 @@ impl<'a> AstNode<'a> for Pat<'a> { | |||
1278 | 1278 | ||
1279 | impl<'a> Pat<'a> {} | 1279 | impl<'a> Pat<'a> {} |
1280 | 1280 | ||
1281 | // Path | ||
1282 | #[derive(Debug, Clone, Copy)] | ||
1283 | pub struct Path<'a> { | ||
1284 | syntax: SyntaxNodeRef<'a>, | ||
1285 | } | ||
1286 | |||
1287 | impl<'a> AstNode<'a> for Path<'a> { | ||
1288 | fn cast(syntax: SyntaxNodeRef<'a>) -> Option<Self> { | ||
1289 | match syntax.kind() { | ||
1290 | PATH => Some(Path { syntax }), | ||
1291 | _ => None, | ||
1292 | } | ||
1293 | } | ||
1294 | fn syntax(self) -> SyntaxNodeRef<'a> { self.syntax } | ||
1295 | } | ||
1296 | |||
1297 | impl<'a> Path<'a> {} | ||
1298 | |||
1281 | // PathExpr | 1299 | // PathExpr |
1282 | #[derive(Debug, Clone, Copy)] | 1300 | #[derive(Debug, Clone, Copy)] |
1283 | pub struct PathExpr<'a> { | 1301 | pub struct PathExpr<'a> { |
diff --git a/crates/libsyntax2/src/grammar.ron b/crates/libsyntax2/src/grammar.ron index 3c293d3e4..0bb40f5ab 100644 --- a/crates/libsyntax2/src/grammar.ron +++ b/crates/libsyntax2/src/grammar.ron | |||
@@ -513,6 +513,7 @@ Grammar( | |||
513 | collections: [ | 513 | collections: [ |
514 | ["args", "Expr"] | 514 | ["args", "Expr"] |
515 | ] | 515 | ] |
516 | ) | 516 | ), |
517 | "Path": (), | ||
517 | }, | 518 | }, |
518 | ) | 519 | ) |