mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-12 05:08:52 +00:00
Lexer: literal suffixes
This commit is contained in:
parent
d6a922459e
commit
0b49db623f
3 changed files with 13 additions and 4 deletions
|
@ -152,7 +152,10 @@ fn scan_char_or_lifetime(ptr: &mut Ptr) -> SyntaxKind {
|
|||
}
|
||||
|
||||
fn scan_literal_suffix(ptr: &mut Ptr) {
|
||||
|
||||
if ptr.next_is_p(is_ident_start) {
|
||||
ptr.bump();
|
||||
}
|
||||
ptr.bump_while(is_ident_continue);
|
||||
}
|
||||
|
||||
fn scan_char_or_byte(ptr: &mut Ptr) {
|
||||
|
|
|
@ -5,4 +5,5 @@
|
|||
0e+1
|
||||
0.e+1
|
||||
0.0E-2
|
||||
0___0.10000____0000e+111__
|
||||
0___0.10000____0000e+111__
|
||||
1i64 92.0f32 11__s
|
|
@ -16,8 +16,7 @@ INT_NUMBER 2 "0e"
|
|||
WHITESPACE 1 " "
|
||||
INT_NUMBER 2 "0E"
|
||||
WHITESPACE 1 " "
|
||||
INT_NUMBER 1 "0"
|
||||
IDENT 1 "z"
|
||||
INT_NUMBER 2 "0z"
|
||||
WHITESPACE 1 "\n"
|
||||
INT_NUMBER 5 "01790"
|
||||
WHITESPACE 1 " "
|
||||
|
@ -60,3 +59,9 @@ WHITESPACE 1 "\n"
|
|||
FLOAT_NUMBER 6 "0.0E-2"
|
||||
WHITESPACE 1 "\n"
|
||||
FLOAT_NUMBER 26 "0___0.10000____0000e+111__"
|
||||
WHITESPACE 1 "\n"
|
||||
INT_NUMBER 4 "1i64"
|
||||
WHITESPACE 1 " "
|
||||
FLOAT_NUMBER 7 "92.0f32"
|
||||
WHITESPACE 1 " "
|
||||
INT_NUMBER 5 "11__s"
|
||||
|
|
Loading…
Reference in a new issue