diff options
Diffstat (limited to 'crates/ide/src/syntax_highlighting/tags.rs')
-rw-r--r-- | crates/ide/src/syntax_highlighting/tags.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/ide/src/syntax_highlighting/tags.rs b/crates/ide/src/syntax_highlighting/tags.rs index 3bee0ae46..a304b3250 100644 --- a/crates/ide/src/syntax_highlighting/tags.rs +++ b/crates/ide/src/syntax_highlighting/tags.rs | |||
@@ -234,6 +234,24 @@ impl From<HlTag> for Highlight { | |||
234 | } | 234 | } |
235 | } | 235 | } |
236 | 236 | ||
237 | impl From<HlOperator> for Highlight { | ||
238 | fn from(op: HlOperator) -> Highlight { | ||
239 | Highlight::new(HlTag::Operator(op)) | ||
240 | } | ||
241 | } | ||
242 | |||
243 | impl From<HlPunct> for Highlight { | ||
244 | fn from(punct: HlPunct) -> Highlight { | ||
245 | Highlight::new(HlTag::Punctuation(punct)) | ||
246 | } | ||
247 | } | ||
248 | |||
249 | impl From<SymbolKind> for Highlight { | ||
250 | fn from(sym: SymbolKind) -> Highlight { | ||
251 | Highlight::new(HlTag::Symbol(sym)) | ||
252 | } | ||
253 | } | ||
254 | |||
237 | impl Highlight { | 255 | impl Highlight { |
238 | pub(crate) fn new(tag: HlTag) -> Highlight { | 256 | pub(crate) fn new(tag: HlTag) -> Highlight { |
239 | Highlight { tag, mods: HlMods::default() } | 257 | Highlight { tag, mods: HlMods::default() } |