Complete types

This commit is contained in:
Aleksey Kladov 2018-08-30 20:03:18 +03:00
parent 9fcebbc512
commit 49e14a99ed
3 changed files with 35 additions and 8 deletions

View file

@ -1278,6 +1278,24 @@ impl<'a> AstNode<'a> for Pat<'a> {
impl<'a> Pat<'a> {}
// Path
#[derive(Debug, Clone, Copy)]
pub struct Path<'a> {
syntax: SyntaxNodeRef<'a>,
}
impl<'a> AstNode<'a> for Path<'a> {
fn cast(syntax: SyntaxNodeRef<'a>) -> Option<Self> {
match syntax.kind() {
PATH => Some(Path { syntax }),
_ => None,
}
}
fn syntax(self) -> SyntaxNodeRef<'a> { self.syntax }
}
impl<'a> Path<'a> {}
// PathExpr
#[derive(Debug, Clone, Copy)]
pub struct PathExpr<'a> {

View file

@ -513,6 +513,7 @@ Grammar(
collections: [
["args", "Expr"]
]
)
),
"Path": (),
},
)