diff options
author | Aleksey Kladov <[email protected]> | 2020-11-06 21:21:56 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-11-06 21:23:14 +0000 |
commit | 5ba4f949c23dcf53f34995c90b7c01e6c641b1f0 (patch) | |
tree | fe5064dde4e948a776c87d38fba972903acad3ec /crates/ide/src/syntax_highlighting | |
parent | 6725dcf847300b9cddcbb061b159317113860f31 (diff) |
Kill RAW_ literals
Syntactically, they are indistinguishable from non-raw versions, so it
doesn't make sense to separate then *at the syntax* level.
Diffstat (limited to 'crates/ide/src/syntax_highlighting')
-rw-r--r-- | crates/ide/src/syntax_highlighting/format.rs | 4 | ||||
-rw-r--r-- | crates/ide/src/syntax_highlighting/injection.rs | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/crates/ide/src/syntax_highlighting/format.rs b/crates/ide/src/syntax_highlighting/format.rs index 71bde24f0..42f27df5d 100644 --- a/crates/ide/src/syntax_highlighting/format.rs +++ b/crates/ide/src/syntax_highlighting/format.rs | |||
@@ -29,9 +29,7 @@ impl FormatStringHighlighter { | |||
29 | .children_with_tokens() | 29 | .children_with_tokens() |
30 | .filter(|t| t.kind() != SyntaxKind::WHITESPACE) | 30 | .filter(|t| t.kind() != SyntaxKind::WHITESPACE) |
31 | .nth(1) | 31 | .nth(1) |
32 | .filter(|e| { | 32 | .filter(|e| ast::String::can_cast(e.kind())) |
33 | ast::String::can_cast(e.kind()) || ast::RawString::can_cast(e.kind()) | ||
34 | }) | ||
35 | } | 33 | } |
36 | _ => {} | 34 | _ => {} |
37 | } | 35 | } |
diff --git a/crates/ide/src/syntax_highlighting/injection.rs b/crates/ide/src/syntax_highlighting/injection.rs index 59a74bc02..79f6b5359 100644 --- a/crates/ide/src/syntax_highlighting/injection.rs +++ b/crates/ide/src/syntax_highlighting/injection.rs | |||
@@ -15,7 +15,7 @@ use super::HighlightedRangeStack; | |||
15 | pub(super) fn highlight_injection( | 15 | pub(super) fn highlight_injection( |
16 | acc: &mut HighlightedRangeStack, | 16 | acc: &mut HighlightedRangeStack, |
17 | sema: &Semantics<RootDatabase>, | 17 | sema: &Semantics<RootDatabase>, |
18 | literal: ast::RawString, | 18 | literal: ast::String, |
19 | expanded: SyntaxToken, | 19 | expanded: SyntaxToken, |
20 | ) -> Option<()> { | 20 | ) -> Option<()> { |
21 | let active_parameter = ActiveParameter::at_token(&sema, expanded)?; | 21 | let active_parameter = ActiveParameter::at_token(&sema, expanded)?; |