mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Wrap float literals in their own node
This commit is contained in:
parent
2d5d16f18c
commit
502c519e7d
13 changed files with 113 additions and 49 deletions
|
@ -29,7 +29,13 @@ pub(crate) fn literal(p: &mut Parser) -> Option<CompletedMarker> {
|
|||
return None;
|
||||
}
|
||||
let m = p.start();
|
||||
p.bump_any();
|
||||
if p.at(FLOAT_NUMBER) {
|
||||
let f = p.start();
|
||||
p.bump(FLOAT_NUMBER);
|
||||
f.complete(p, FLOAT_LITERAL);
|
||||
} else {
|
||||
p.bump_any();
|
||||
}
|
||||
Some(m.complete(p, LITERAL))
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue