Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/parser/src/grammar.rs')
-rw-r--r--crates/parser/src/grammar.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/parser/src/grammar.rs b/crates/parser/src/grammar.rs
index f68d7196c8..4ebf2157c6 100644
--- a/crates/parser/src/grammar.rs
+++ b/crates/parser/src/grammar.rs
@@ -324,7 +324,9 @@ fn name_ref_or_index(p: &mut Parser) {
);
let m = p.start();
if p.at(FLOAT_NUMBER_PART) || p.at_ts(FLOAT_LITERAL_FIRST) {
- p.bump_remap(INT_NUMBER);
+ // Ideally we'd remap this to `INT_NUMBER` instead, but that causes the MBE conversion to
+ // lose track of what's a float and what isn't, causing panics.
+ p.bump_remap(FLOAT_NUMBER_PART);
} else {
p.bump_any();
}