From ede5d17b0409f9d5a209aaf16508262dbd2a4489 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 00:27:00 +0200 Subject: Finish SourceFile grammar --- xtask/src/codegen/gen_syntax.rs | 2 +- xtask/src/codegen/rust.ungram | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'xtask') diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs index 24e8be1fb..9b49712c1 100644 --- a/xtask/src/codegen/gen_syntax.rs +++ b/xtask/src/codegen/gen_syntax.rs @@ -374,6 +374,7 @@ fn generate_syntax_kinds(grammar: KindsSrc<'_>) -> Result { #([#all_keywords_idents] => { $crate::SyntaxKind::#all_keywords };)* [lifetime] => { $crate::SyntaxKind::LIFETIME }; [ident] => { $crate::SyntaxKind::IDENT }; + [shebang] => { $crate::SyntaxKind::SHEBANG }; } }; @@ -595,7 +596,6 @@ fn lower_rule(acc: &mut Vec, grammar: &Grammar, rule: &Rule) { } fn deduplicate_fields(ast: &mut AstSrc) { - eprintln!(); for node in &mut ast.nodes { let mut i = 0; 'outer: while i < node.fields.len() { diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index 08db70093..a93cb3815 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram @@ -1,4 +1,5 @@ SourceFile = + 'shebang'? Attr* Item* -- cgit v1.2.3