Handle question marks in model lexer, closes #15879

This commit is contained in:
Florian Hahn 2015-01-13 23:31:53 +01:00
parent 4fd1e6235d
commit d397a3e654
2 changed files with 6 additions and 0 deletions

View File

@ -194,8 +194,13 @@ LIT_STR_RAW
: 'r' LIT_STR_RAW_INNER SUFFIX?
;
QUESTION : '?';
IDENT : XID_start XID_continue* ;
fragment QUESTION_IDENTIFIER : QUESTION? IDENT;
LIFETIME : '\'' IDENT ;
WHITESPACE : [ \r\n\t]+ ;

View File

@ -107,6 +107,7 @@ fn parse_token_list(file: &str) -> HashMap<String, token::Token> {
"LE" => token::Le,
"LIT_BINARY" => token::Literal(token::Binary(Name(0)), None),
"LIT_BINARY_RAW" => token::Literal(token::BinaryRaw(Name(0), 0), None),
"QUESTION" => token::Question,
_ => continue,
};