mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Wrap floats in token trees in FLOAT_LITERAL
node
This commit is contained in:
parent
90bd99f1bb
commit
34dc8e9383
6 changed files with 33 additions and 22 deletions
|
@ -31,6 +31,9 @@ pub(super) fn token(sema: &Semantics<RootDatabase>, token: SyntaxToken) -> Optio
|
|||
SymbolKind::Field.into()
|
||||
}
|
||||
INT_NUMBER | FLOAT_NUMBER_PART => HlTag::NumericLiteral.into(),
|
||||
DOT if token.parent().map(|n| n.kind()) == Some(FLOAT_LITERAL) => {
|
||||
HlTag::NumericLiteral.into()
|
||||
}
|
||||
BYTE => HlTag::ByteLiteral.into(),
|
||||
CHAR => HlTag::CharLiteral.into(),
|
||||
IDENT if token.parent().and_then(ast::TokenTree::cast).is_some() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue