mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Make name_ref to accept numeric names optionally
This commit is contained in:
parent
957b5ed23a
commit
fa24e20867
5 changed files with 9 additions and 9 deletions
|
@ -273,8 +273,8 @@ fn name(p: &mut Parser) {
|
|||
name_r(p, TokenSet::empty())
|
||||
}
|
||||
|
||||
fn name_ref(p: &mut Parser) {
|
||||
if p.at(IDENT) || p.at(INT_NUMBER) {
|
||||
fn name_ref(p: &mut Parser, allow_numeric_names: bool) {
|
||||
if p.at(IDENT) || (allow_numeric_names && p.at(INT_NUMBER)) {
|
||||
let m = p.start();
|
||||
p.bump();
|
||||
m.complete(p, NAME_REF);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue