Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'xtask/src/codegen/grammar.rs')
| -rw-r--r-- | xtask/src/codegen/grammar.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xtask/src/codegen/grammar.rs b/xtask/src/codegen/grammar.rs index e7534582f2..d39231f1c2 100644 --- a/xtask/src/codegen/grammar.rs +++ b/xtask/src/codegen/grammar.rs @@ -163,6 +163,13 @@ fn generate_nodes(kinds: KindsSrc, grammar: &AstSrc) -> String { quote! { impl AstNode for #name { #[inline] + fn kind() -> SyntaxKind + where + Self: Sized + { + #kind + } + #[inline] fn can_cast(kind: SyntaxKind) -> bool { kind == #kind } |