Skip to content

Commit d397a3e

Browse files
committed
Handle question marks in model lexer, closes #15879
1 parent 4fd1e62 commit d397a3e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/grammar/RustLexer.g4

+5
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,13 @@ LIT_STR_RAW
194194
: 'r' LIT_STR_RAW_INNER SUFFIX?
195195
;
196196

197+
198+
QUESTION : '?';
199+
197200
IDENT : XID_start XID_continue* ;
198201

202+
fragment QUESTION_IDENTIFIER : QUESTION? IDENT;
203+
199204
LIFETIME : '\'' IDENT ;
200205

201206
WHITESPACE : [ \r\n\t]+ ;

src/grammar/verify.rs

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ fn parse_token_list(file: &str) -> HashMap<String, token::Token> {
107107
"LE" => token::Le,
108108
"LIT_BINARY" => token::Literal(token::Binary(Name(0)), None),
109109
"LIT_BINARY_RAW" => token::Literal(token::BinaryRaw(Name(0), 0), None),
110+
"QUESTION" => token::Question,
110111
_ => continue,
111112
};
112113

0 commit comments

Comments
 (0)