aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lexer/mod.rs5
-rw-r--r--tests/data/lexer/0004_number.rs3
-rw-r--r--tests/data/lexer/0004_number.txt9
3 files changed, 13 insertions, 4 deletions
diff --git a/src/lexer/mod.rs b/src/lexer/mod.rs
index 3f277bd2b..918683556 100644
--- a/src/lexer/mod.rs
+++ b/src/lexer/mod.rs
@@ -152,7 +152,10 @@ fn scan_char_or_lifetime(ptr: &mut Ptr) -> SyntaxKind {
152} 152}
153 153
154fn scan_literal_suffix(ptr: &mut Ptr) { 154fn scan_literal_suffix(ptr: &mut Ptr) {
155 155 if ptr.next_is_p(is_ident_start) {
156 ptr.bump();
157 }
158 ptr.bump_while(is_ident_continue);
156} 159}
157 160
158fn scan_char_or_byte(ptr: &mut Ptr) { 161fn scan_char_or_byte(ptr: &mut Ptr) {
diff --git a/tests/data/lexer/0004_number.rs b/tests/data/lexer/0004_number.rs
index 0c0d37627..dc974b553 100644
--- a/tests/data/lexer/0004_number.rs
+++ b/tests/data/lexer/0004_number.rs
@@ -5,4 +5,5 @@
50e+1 50e+1
60.e+1 60.e+1
70.0E-2 70.0E-2
80___0.10000____0000e+111__ \ No newline at end of file 80___0.10000____0000e+111__
91i64 92.0f32 11__s \ No newline at end of file
diff --git a/tests/data/lexer/0004_number.txt b/tests/data/lexer/0004_number.txt
index ede39aa99..be8dee48b 100644
--- a/tests/data/lexer/0004_number.txt
+++ b/tests/data/lexer/0004_number.txt
@@ -16,8 +16,7 @@ INT_NUMBER 2 "0e"
16WHITESPACE 1 " " 16WHITESPACE 1 " "
17INT_NUMBER 2 "0E" 17INT_NUMBER 2 "0E"
18WHITESPACE 1 " " 18WHITESPACE 1 " "
19INT_NUMBER 1 "0" 19INT_NUMBER 2 "0z"
20IDENT 1 "z"
21WHITESPACE 1 "\n" 20WHITESPACE 1 "\n"
22INT_NUMBER 5 "01790" 21INT_NUMBER 5 "01790"
23WHITESPACE 1 " " 22WHITESPACE 1 " "
@@ -60,3 +59,9 @@ WHITESPACE 1 "\n"
60FLOAT_NUMBER 6 "0.0E-2" 59FLOAT_NUMBER 6 "0.0E-2"
61WHITESPACE 1 "\n" 60WHITESPACE 1 "\n"
62FLOAT_NUMBER 26 "0___0.10000____0000e+111__" 61FLOAT_NUMBER 26 "0___0.10000____0000e+111__"
62WHITESPACE 1 "\n"
63INT_NUMBER 4 "1i64"
64WHITESPACE 1 " "
65FLOAT_NUMBER 7 "92.0f32"
66WHITESPACE 1 " "
67INT_NUMBER 5 "11__s"