aboutsummaryrefslogtreecommitdiff
path: root/xtask
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-29 23:27:00 +0100
committerAleksey Kladov <[email protected]>2020-07-29 23:46:39 +0100
commitede5d17b0409f9d5a209aaf16508262dbd2a4489 (patch)
tree5d1bce4aa147d623035e78b78d4fcc11a4019f70 /xtask
parent6636f56e79b55f22b88094b7edaed6ec88880500 (diff)
Finish SourceFile grammar
Diffstat (limited to 'xtask')
-rw-r--r--xtask/src/codegen/gen_syntax.rs2
-rw-r--r--xtask/src/codegen/rust.ungram1
2 files changed, 2 insertions, 1 deletions
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<String> {
374 #([#all_keywords_idents] => { $crate::SyntaxKind::#all_keywords };)* 374 #([#all_keywords_idents] => { $crate::SyntaxKind::#all_keywords };)*
375 [lifetime] => { $crate::SyntaxKind::LIFETIME }; 375 [lifetime] => { $crate::SyntaxKind::LIFETIME };
376 [ident] => { $crate::SyntaxKind::IDENT }; 376 [ident] => { $crate::SyntaxKind::IDENT };
377 [shebang] => { $crate::SyntaxKind::SHEBANG };
377 } 378 }
378 }; 379 };
379 380
@@ -595,7 +596,6 @@ fn lower_rule(acc: &mut Vec<Field>, grammar: &Grammar, rule: &Rule) {
595} 596}
596 597
597fn deduplicate_fields(ast: &mut AstSrc) { 598fn deduplicate_fields(ast: &mut AstSrc) {
598 eprintln!();
599 for node in &mut ast.nodes { 599 for node in &mut ast.nodes {
600 let mut i = 0; 600 let mut i = 0;
601 'outer: while i < node.fields.len() { 601 '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 @@
1SourceFile = 1SourceFile =
2 'shebang'?
2 Attr* 3 Attr*
3 Item* 4 Item*
4 5