From 3bd4560d6eb6404f05c2c99a5755b86e9e896eb9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 31 Jan 2019 10:30:15 +0300 Subject: convert punts and literals --- crates/ra_syntax/src/grammar.ron | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'crates/ra_syntax/src/grammar.ron') diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron index d4c863705..47334bdf0 100644 --- a/crates/ra_syntax/src/grammar.ron +++ b/crates/ra_syntax/src/grammar.ron @@ -24,6 +24,7 @@ Grammar( ["/", "SLASH"], ["^", "CARET"], ["%", "PERCENT"], + ["_", "UNDERSCORE"], ], // Tokens for which the longest match must be chosen (e.g. `..` is a DOTDOT, but `.` is a DOT) multi_byte_tokens: [ @@ -99,20 +100,21 @@ Grammar( "default", "union", ], - tokens: [ - "ERROR", - "IDENT", - "UNDERSCORE", - "WHITESPACE", + literals: [ "INT_NUMBER", "FLOAT_NUMBER", - "LIFETIME", "CHAR", "BYTE", "STRING", "RAW_STRING", "BYTE_STRING", "RAW_BYTE_STRING", + ], + tokens: [ + "ERROR", + "IDENT", + "WHITESPACE", + "LIFETIME", "COMMENT", "SHEBANG", ], -- cgit v1.2.3