Highlight tuple field accesses correctly

This commit is contained in:
Lukas Wirth
2021-06-11 21:19:19 +02:00
parent 863e23f00f
commit e09723f0af
3 changed files with 7 additions and 4 deletions

View File

@@ -131,6 +131,9 @@ pub(super) fn element(
}
STRING | BYTE_STRING => HlTag::StringLiteral.into(),
ATTR => HlTag::Attribute.into(),
INT_NUMBER if element.ancestors().nth(1).map_or(false, |it| it.kind() == FIELD_EXPR) => {
SymbolKind::Field.into()
}
INT_NUMBER | FLOAT_NUMBER => HlTag::NumericLiteral.into(),
BYTE => HlTag::ByteLiteral.into(),
CHAR => HlTag::CharLiteral.into(),