From 3820b26a9325b26acd614bcad57d410e7286226e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 6 Nov 2020 18:19:24 +0100 Subject: Generate token for ints and floats --- xtask/src/codegen/gen_syntax.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'xtask') diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs index 02f4095ce..87c934e66 100644 --- a/xtask/src/codegen/gen_syntax.rs +++ b/xtask/src/codegen/gen_syntax.rs @@ -504,7 +504,11 @@ impl Field { fn lower(grammar: &Grammar) -> AstSrc { let mut res = AstSrc::default(); - res.tokens = vec!["Whitespace".into(), "Comment".into(), "String".into(), "RawString".into()]; + + res.tokens = "Whitespace Comment String RawString IntNumber FloatNumber" + .split_ascii_whitespace() + .map(|it| it.to_string()) + .collect::>(); let nodes = grammar.iter().collect::>(); -- cgit v1.2.3