diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-31 16:09:31 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-31 16:09:31 +0100 |
commit | 7325283c6977e078513b5b21aa173775e2b22e12 (patch) | |
tree | 7be8b4fbc2e7470bf7891d81b3812eb572bb0d1c /xtask/src/codegen/gen_syntax.rs | |
parent | ad239f6197bda31f7a9b904b5ccb25c93cbc701a (diff) | |
parent | 633aace41108b74fe6c93c5ab04272067db033f9 (diff) |
Merge #5624
5624: Finalize expressions grammar r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
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) => { |