Skip to content

Commit 8d28289

Browse files
committed
Specify literal tokens
1 parent 7980a7e commit 8d28289

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

xtask/src/codegen/gen_syntax.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,7 @@ fn lower_rule(acc: &mut Vec<Field>, grammar: &Grammar, label: Option<&String>, r
590590
| "op"
591591
| "index"
592592
| "base"
593+
| "value"
593594
);
594595
if manually_implemented {
595596
return;

xtask/src/codegen/rust.ungram

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,13 @@ Expr =
239239
| WhileExpr
240240

241241
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+
)
243249

244250
PathExpr =
245251
Attr* Path

0 commit comments

Comments
 (0)