mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-28 15:43:21 +00:00
Handle question marks in model lexer, closes #15879
This commit is contained in:
parent
4fd1e6235d
commit
d397a3e654
@ -194,8 +194,13 @@ LIT_STR_RAW
|
|||||||
: 'r' LIT_STR_RAW_INNER SUFFIX?
|
: 'r' LIT_STR_RAW_INNER SUFFIX?
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
QUESTION : '?';
|
||||||
|
|
||||||
IDENT : XID_start XID_continue* ;
|
IDENT : XID_start XID_continue* ;
|
||||||
|
|
||||||
|
fragment QUESTION_IDENTIFIER : QUESTION? IDENT;
|
||||||
|
|
||||||
LIFETIME : '\'' IDENT ;
|
LIFETIME : '\'' IDENT ;
|
||||||
|
|
||||||
WHITESPACE : [ \r\n\t]+ ;
|
WHITESPACE : [ \r\n\t]+ ;
|
||||||
|
@ -107,6 +107,7 @@ fn parse_token_list(file: &str) -> HashMap<String, token::Token> {
|
|||||||
"LE" => token::Le,
|
"LE" => token::Le,
|
||||||
"LIT_BINARY" => token::Literal(token::Binary(Name(0)), None),
|
"LIT_BINARY" => token::Literal(token::Binary(Name(0)), None),
|
||||||
"LIT_BINARY_RAW" => token::Literal(token::BinaryRaw(Name(0), 0), None),
|
"LIT_BINARY_RAW" => token::Literal(token::BinaryRaw(Name(0), 0), None),
|
||||||
|
"QUESTION" => token::Question,
|
||||||
_ => continue,
|
_ => continue,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user