diff options
author | GrayJack <[email protected]> | 2020-07-20 16:36:23 +0100 |
---|---|---|
committer | GrayJack <[email protected]> | 2020-07-20 16:36:23 +0100 |
commit | a662228de41a8b35d61b2bd312d30d34623e2232 (patch) | |
tree | b838c161abff8b1749c45fee54082a8cb34e75fa /crates/ra_ide/src | |
parent | 54ebb2ce301813a9b5b48d5abe97ace370cfa617 (diff) |
Assingment semantic highlight
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs index 2b1b6a4fd..f088487fa 100644 --- a/crates/ra_ide/src/syntax_highlighting.rs +++ b/crates/ra_ide/src/syntax_highlighting.rs | |||
@@ -540,7 +540,7 @@ fn highlight_element( | |||
540 | } | 540 | } |
541 | } | 541 | } |
542 | p if p.is_punct() => match p { | 542 | p if p.is_punct() => match p { |
543 | T![::] | T![->] | T![=>] | T![&] => HighlightTag::Operator.into(), | 543 | T![::] | T![->] | T![=>] | T![&] | T![..] | T![=] => HighlightTag::Operator.into(), |
544 | T![@] => HighlightTag::Operator | HighlightModifier::ControlFlow, | 544 | T![@] => HighlightTag::Operator | HighlightModifier::ControlFlow, |
545 | T![!] if element.parent().and_then(ast::MacroCall::cast).is_some() => { | 545 | T![!] if element.parent().and_then(ast::MacroCall::cast).is_some() => { |
546 | HighlightTag::Macro.into() | 546 | HighlightTag::Macro.into() |
@@ -573,6 +573,12 @@ fn highlight_element( | |||
573 | _ if element.parent().and_then(ast::RangeExpr::cast).is_some() => { | 573 | _ if element.parent().and_then(ast::RangeExpr::cast).is_some() => { |
574 | HighlightTag::Operator.into() | 574 | HighlightTag::Operator.into() |
575 | } | 575 | } |
576 | _ if element.parent().and_then(ast::RangePat::cast).is_some() => { | ||
577 | HighlightTag::Operator.into() | ||
578 | } | ||
579 | _ if element.parent().and_then(ast::DotDotPat::cast).is_some() => { | ||
580 | HighlightTag::Operator.into() | ||
581 | } | ||
576 | _ => HighlightTag::Punctuation.into(), | 582 | _ => HighlightTag::Punctuation.into(), |
577 | }, | 583 | }, |
578 | 584 | ||