mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-25 13:23:58 +00:00
Split float literal tokens at the .
This commit is contained in:
parent
502c519e7d
commit
1bc3305d95
23 changed files with 157 additions and 72 deletions
|
|
@ -1,14 +1,14 @@
|
|||
FLOAT_NUMBER "0e" error: Missing digits after the exponent symbol
|
||||
FLOAT_NUMBER_PART "0e" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "0E" error: Missing digits after the exponent symbol
|
||||
FLOAT_NUMBER_PART "0E" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n\n"
|
||||
FLOAT_NUMBER "42e+" error: Missing digits after the exponent symbol
|
||||
FLOAT_NUMBER_PART "42e+" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "42e-" error: Missing digits after the exponent symbol
|
||||
FLOAT_NUMBER_PART "42e-" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "42E+" error: Missing digits after the exponent symbol
|
||||
FLOAT_NUMBER_PART "42E+" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "42E-" error: Missing digits after the exponent symbol
|
||||
FLOAT_NUMBER_PART "42E-" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n\n"
|
||||
INT_NUMBER "42"
|
||||
DOT "."
|
||||
|
|
@ -30,19 +30,35 @@ DOT "."
|
|||
IDENT "E"
|
||||
MINUS "-"
|
||||
WHITESPACE "\n\n"
|
||||
FLOAT_NUMBER "42.2e+" error: Missing digits after the exponent symbol
|
||||
FLOAT_NUMBER_PART "42"
|
||||
DOT "."
|
||||
FLOAT_NUMBER_PART "2e+" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "42.2e-" error: Missing digits after the exponent symbol
|
||||
FLOAT_NUMBER_PART "42"
|
||||
DOT "."
|
||||
FLOAT_NUMBER_PART "2e-" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "42.2E+" error: Missing digits after the exponent symbol
|
||||
FLOAT_NUMBER_PART "42"
|
||||
DOT "."
|
||||
FLOAT_NUMBER_PART "2E+" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "42.2E-" error: Missing digits after the exponent symbol
|
||||
FLOAT_NUMBER_PART "42"
|
||||
DOT "."
|
||||
FLOAT_NUMBER_PART "2E-" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n\n"
|
||||
FLOAT_NUMBER "42.2e+f32" error: Missing digits after the exponent symbol
|
||||
FLOAT_NUMBER_PART "42"
|
||||
DOT "."
|
||||
FLOAT_NUMBER_PART "2e+f32" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "42.2e-f32" error: Missing digits after the exponent symbol
|
||||
FLOAT_NUMBER_PART "42"
|
||||
DOT "."
|
||||
FLOAT_NUMBER_PART "2e-f32" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "42.2E+f32" error: Missing digits after the exponent symbol
|
||||
FLOAT_NUMBER_PART "42"
|
||||
DOT "."
|
||||
FLOAT_NUMBER_PART "2E+f32" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "42.2E-f32" error: Missing digits after the exponent symbol
|
||||
FLOAT_NUMBER_PART "42"
|
||||
DOT "."
|
||||
FLOAT_NUMBER_PART "2E-f32" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ INT_NUMBER "00"
|
|||
WHITESPACE " "
|
||||
INT_NUMBER "0_"
|
||||
WHITESPACE " "
|
||||
FLOAT_NUMBER "0."
|
||||
FLOAT_NUMBER_PART "0"
|
||||
DOT "."
|
||||
WHITESPACE " "
|
||||
INT_NUMBER "0z"
|
||||
WHITESPACE "\n"
|
||||
|
|
@ -20,11 +21,13 @@ INT_NUMBER "001279"
|
|||
WHITESPACE " "
|
||||
INT_NUMBER "0_1279"
|
||||
WHITESPACE " "
|
||||
FLOAT_NUMBER "0.1279"
|
||||
FLOAT_NUMBER_PART "0"
|
||||
DOT "."
|
||||
FLOAT_NUMBER_PART "1279"
|
||||
WHITESPACE " "
|
||||
FLOAT_NUMBER "0e1279"
|
||||
FLOAT_NUMBER_PART "0e1279"
|
||||
WHITESPACE " "
|
||||
FLOAT_NUMBER "0E1279"
|
||||
FLOAT_NUMBER_PART "0E1279"
|
||||
WHITESPACE "\n"
|
||||
INT_NUMBER "0"
|
||||
DOT "."
|
||||
|
|
@ -37,7 +40,7 @@ IDENT "foo"
|
|||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "0e+1"
|
||||
FLOAT_NUMBER_PART "0e+1"
|
||||
WHITESPACE "\n"
|
||||
INT_NUMBER "0"
|
||||
DOT "."
|
||||
|
|
@ -45,13 +48,19 @@ IDENT "e"
|
|||
PLUS "+"
|
||||
INT_NUMBER "1"
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "0.0E-2"
|
||||
FLOAT_NUMBER_PART "0"
|
||||
DOT "."
|
||||
FLOAT_NUMBER_PART "0E-2"
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "0___0.10000____0000e+111__"
|
||||
FLOAT_NUMBER_PART "0___0"
|
||||
DOT "."
|
||||
FLOAT_NUMBER_PART "10000____0000e+111__"
|
||||
WHITESPACE "\n"
|
||||
INT_NUMBER "1i64"
|
||||
WHITESPACE " "
|
||||
FLOAT_NUMBER "92.0f32"
|
||||
FLOAT_NUMBER_PART "92"
|
||||
DOT "."
|
||||
FLOAT_NUMBER_PART "0f32"
|
||||
WHITESPACE " "
|
||||
INT_NUMBER "11__s"
|
||||
WHITESPACE "\n"
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@ SOURCE_FILE
|
|||
INT_NUMBER "1"
|
||||
COMMA ","
|
||||
WHITESPACE " "
|
||||
FLOAT_NUMBER "2.0"
|
||||
FLOAT_NUMBER_PART "2"
|
||||
DOT "."
|
||||
FLOAT_NUMBER_PART "0"
|
||||
WHITESPACE "\n "
|
||||
R_CURLY "}"
|
||||
WHITESPACE " "
|
||||
|
|
|
|||
|
|
@ -58,7 +58,9 @@ SOURCE_FILE
|
|||
WHITESPACE " "
|
||||
LITERAL
|
||||
FLOAT_LITERAL
|
||||
FLOAT_NUMBER "2.0"
|
||||
FLOAT_NUMBER_PART "2"
|
||||
DOT "."
|
||||
FLOAT_NUMBER_PART "0"
|
||||
SEMICOLON ";"
|
||||
WHITESPACE "\n "
|
||||
LET_STMT
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@ SOURCE_FILE
|
|||
METHOD_CALL_EXPR
|
||||
LITERAL
|
||||
FLOAT_LITERAL
|
||||
FLOAT_NUMBER "1.0f32"
|
||||
FLOAT_NUMBER_PART "1"
|
||||
DOT "."
|
||||
FLOAT_NUMBER_PART "0f32"
|
||||
DOT "."
|
||||
NAME_REF
|
||||
IDENT "floor"
|
||||
|
|
@ -42,7 +44,9 @@ SOURCE_FILE
|
|||
METHOD_CALL_EXPR
|
||||
LITERAL
|
||||
FLOAT_LITERAL
|
||||
FLOAT_NUMBER "1.0f32"
|
||||
FLOAT_NUMBER_PART "1"
|
||||
DOT "."
|
||||
FLOAT_NUMBER_PART "0f32"
|
||||
DOT "."
|
||||
NAME_REF
|
||||
IDENT "floor"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue