aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/syntax_highlighting/tags.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide/src/syntax_highlighting/tags.rs')
-rw-r--r--crates/ide/src/syntax_highlighting/tags.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ide/src/syntax_highlighting/tags.rs b/crates/ide/src/syntax_highlighting/tags.rs
index 8b8867079..a0286b72d 100644
--- a/crates/ide/src/syntax_highlighting/tags.rs
+++ b/crates/ide/src/syntax_highlighting/tags.rs
@@ -94,13 +94,13 @@ impl HighlightTag {
94 HighlightTag::Comment => "comment", 94 HighlightTag::Comment => "comment",
95 HighlightTag::EscapeSequence => "escape_sequence", 95 HighlightTag::EscapeSequence => "escape_sequence",
96 HighlightTag::FormatSpecifier => "format_specifier", 96 HighlightTag::FormatSpecifier => "format_specifier",
97 HighlightTag::Dummy => "dummy",
98 HighlightTag::Keyword => "keyword", 97 HighlightTag::Keyword => "keyword",
99 HighlightTag::Punctuation => "punctuation", 98 HighlightTag::Punctuation => "punctuation",
100 HighlightTag::NumericLiteral => "numeric_literal", 99 HighlightTag::NumericLiteral => "numeric_literal",
101 HighlightTag::Operator => "operator", 100 HighlightTag::Operator => "operator",
102 HighlightTag::StringLiteral => "string_literal", 101 HighlightTag::StringLiteral => "string_literal",
103 HighlightTag::UnresolvedReference => "unresolved_reference", 102 HighlightTag::UnresolvedReference => "unresolved_reference",
103 HighlightTag::Dummy => "dummy",
104 } 104 }
105 } 105 }
106} 106}
@@ -173,6 +173,9 @@ impl Highlight {
173 pub(crate) fn new(tag: HighlightTag) -> Highlight { 173 pub(crate) fn new(tag: HighlightTag) -> Highlight {
174 Highlight { tag, modifiers: HighlightModifiers::default() } 174 Highlight { tag, modifiers: HighlightModifiers::default() }
175 } 175 }
176 pub fn is_empty(&self) -> bool {
177 self.tag == HighlightTag::Dummy && self.modifiers == HighlightModifiers::default()
178 }
176} 179}
177 180
178impl ops::BitOr<HighlightModifier> for HighlightTag { 181impl ops::BitOr<HighlightModifier> for HighlightTag {