From 8d28289d0f83225672fc42abcf684364582e73c5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 31 Jul 2020 18:16:08 +0200 Subject: Specify literal tokens --- xtask/src/codegen/gen_syntax.rs | 1 + xtask/src/codegen/rust.ungram | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'xtask') 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, grammar: &Grammar, label: Option<&String>, r | "op" | "index" | "base" + | "value" ); if manually_implemented { 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 = | WhileExpr Literal = - Attr* 'int_number' + Attr* value:( + 'int_number' | 'float_number' + | 'string' | 'raw_string' + | 'byte_string' | 'raw_byte_string' + | 'true' | 'false' + | 'char' | 'byte' + ) PathExpr = Attr* Path -- cgit v1.2.3