Shorten frequent names

This commit is contained in:
Aleksey Kladov 2021-01-09 14:44:01 +03:00
parent 6fb52af521
commit 64a6ee4535
8 changed files with 222 additions and 246 deletions

View file

@ -4,7 +4,7 @@ use syntax::{
AstNode, AstToken, SyntaxElement, SyntaxKind, SyntaxNode, TextRange,
};
use crate::{HighlightTag, HighlightedRange, SymbolKind};
use crate::{HighlightedRange, HlTag, SymbolKind};
use super::highlights::Highlights;
@ -57,7 +57,7 @@ impl FormatStringHighlighter {
}
}
fn highlight_format_specifier(kind: FormatSpecifier) -> Option<HighlightTag> {
fn highlight_format_specifier(kind: FormatSpecifier) -> Option<HlTag> {
Some(match kind {
FormatSpecifier::Open
| FormatSpecifier::Close
@ -69,8 +69,8 @@ fn highlight_format_specifier(kind: FormatSpecifier) -> Option<HighlightTag> {
| FormatSpecifier::DollarSign
| FormatSpecifier::Dot
| FormatSpecifier::Asterisk
| FormatSpecifier::QuestionMark => HighlightTag::FormatSpecifier,
FormatSpecifier::Integer | FormatSpecifier::Zero => HighlightTag::NumericLiteral,
FormatSpecifier::Identifier => HighlightTag::Symbol(SymbolKind::Local),
| FormatSpecifier::QuestionMark => HlTag::FormatSpecifier,
FormatSpecifier::Integer | FormatSpecifier::Zero => HlTag::NumericLiteral,
FormatSpecifier::Identifier => HlTag::Symbol(SymbolKind::Local),
})
}