diff options
author | Aleksey Kladov <[email protected]> | 2020-07-31 17:16:08 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-31 17:16:08 +0100 |
commit | 8d28289d0f83225672fc42abcf684364582e73c5 (patch) | |
tree | e0f799de029415f478ce5365861ad9f1403de49b /xtask | |
parent | 7980a7e19a679e0bc128f2c142609f7f4a197bf6 (diff) |
Specify literal tokens
Diffstat (limited to 'xtask')
-rw-r--r-- | xtask/src/codegen/gen_syntax.rs | 1 | ||||
-rw-r--r-- | xtask/src/codegen/rust.ungram | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs index 059538696..e6231ece2 100644 --- a/xtask/src/codegen/gen_syntax.rs +++ b/xtask/src/codegen/gen_syntax.rs | |||
@@ -590,6 +590,7 @@ fn lower_rule(acc: &mut Vec<Field>, grammar: &Grammar, label: Option<&String>, r | |||
590 | | "op" | 590 | | "op" |
591 | | "index" | 591 | | "index" |
592 | | "base" | 592 | | "base" |
593 | | "value" | ||
593 | ); | 594 | ); |
594 | if manually_implemented { | 595 | if manually_implemented { |
595 | return; | 596 | return; |
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index 8edabc3b9..bc1dd6761 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram | |||
@@ -239,7 +239,13 @@ Expr = | |||
239 | | WhileExpr | 239 | | WhileExpr |
240 | 240 | ||
241 | Literal = | 241 | Literal = |
242 | Attr* 'int_number' | 242 | Attr* value:( |
243 | 'int_number' | 'float_number' | ||
244 | | 'string' | 'raw_string' | ||
245 | | 'byte_string' | 'raw_byte_string' | ||
246 | | 'true' | 'false' | ||
247 | | 'char' | 'byte' | ||
248 | ) | ||
243 | 249 | ||
244 | PathExpr = | 250 | PathExpr = |
245 | Attr* Path | 251 | Attr* Path |