diff options
Diffstat (limited to 'xtask/src/codegen/gen_syntax.rs')
-rw-r--r-- | xtask/src/codegen/gen_syntax.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs index d9f358513..059538696 100644 --- a/xtask/src/codegen/gen_syntax.rs +++ b/xtask/src/codegen/gen_syntax.rs | |||
@@ -579,6 +579,21 @@ fn lower_rule(acc: &mut Vec<Field>, grammar: &Grammar, label: Option<&String>, r | |||
579 | } | 579 | } |
580 | Rule::Labeled { label: l, rule } => { | 580 | Rule::Labeled { label: l, rule } => { |
581 | assert!(label.is_none()); | 581 | assert!(label.is_none()); |
582 | let manually_implemented = matches!( | ||
583 | l.as_str(), | ||
584 | "lhs" | ||
585 | | "rhs" | ||
586 | | "then_branch" | ||
587 | | "else_branch" | ||
588 | | "start" | ||
589 | | "end" | ||
590 | | "op" | ||
591 | | "index" | ||
592 | | "base" | ||
593 | ); | ||
594 | if manually_implemented { | ||
595 | return; | ||
596 | } | ||
582 | lower_rule(acc, grammar, Some(l), rule); | 597 | lower_rule(acc, grammar, Some(l), rule); |
583 | } | 598 | } |
584 | Rule::Seq(rules) | Rule::Alt(rules) => { | 599 | Rule::Seq(rules) | Rule::Alt(rules) => { |