This commit is contained in:
Aleksey Kladov 2018-08-11 11:03:22 +03:00
parent 78f41ea707
commit d5119133fc
5 changed files with 124 additions and 13 deletions

View file

@ -12,7 +12,7 @@ pub struct {{ node }}<R: TreeRoot = Arc<SyntaxRoot>> {
impl<R: TreeRoot> AstNode<R> for {{ node }}<R> {
fn cast(syntax: SyntaxNode<R>) -> Option<Self> {
match syntax.kind() {
{{ node | upper }} => Some({{ node }} { syntax }),
{{ node | SCREAM }} => Some({{ node }} { syntax }),
_ => None,
}
}