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.rs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/crates/parser/src/grammar.rs b/crates/parser/src/grammar.rs index 4ebf2157c6..4efbf9a606 100644 --- a/crates/parser/src/grammar.rs +++ b/crates/parser/src/grammar.rs @@ -39,7 +39,6 @@ mod generic_params; mod types; use crate::{ - grammar::expressions::FLOAT_LITERAL_FIRST, parser::{CompletedMarker, Marker, Parser}, SyntaxKind::{self, *}, TokenSet, T, @@ -319,17 +318,9 @@ fn name_ref(p: &mut Parser) { } fn name_ref_or_index(p: &mut Parser) { - assert!( - p.at(IDENT) || p.at(INT_NUMBER) || p.at(FLOAT_NUMBER_PART) || p.at_ts(FLOAT_LITERAL_FIRST) - ); + assert!(p.at(IDENT) || p.at(INT_NUMBER)); let m = p.start(); - if p.at(FLOAT_NUMBER_PART) || p.at_ts(FLOAT_LITERAL_FIRST) { - // 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(); - } + p.bump_any(); m.complete(p, NAME_REF); } |