From 5ba4f949c23dcf53f34995c90b7c01e6c641b1f0 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 6 Nov 2020 22:21:56 +0100 Subject: Kill RAW_ literals Syntactically, they are indistinguishable from non-raw versions, so it doesn't make sense to separate then *at the syntax* level. --- crates/ide/src/syntax_highlighting/format.rs | 4 +--- crates/ide/src/syntax_highlighting/injection.rs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'crates/ide/src/syntax_highlighting') 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 { .children_with_tokens() .filter(|t| t.kind() != SyntaxKind::WHITESPACE) .nth(1) - .filter(|e| { - ast::String::can_cast(e.kind()) || ast::RawString::can_cast(e.kind()) - }) + .filter(|e| ast::String::can_cast(e.kind())) } _ => {} } 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; pub(super) fn highlight_injection( acc: &mut HighlightedRangeStack, sema: &Semantics, - literal: ast::RawString, + literal: ast::String, expanded: SyntaxToken, ) -> Option<()> { let active_parameter = ActiveParameter::at_token(&sema, expanded)?; -- cgit v1.2.3 From 6158304f8b64ef7cdf58b14bc675baf33a27a853 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 6 Nov 2020 22:30:58 +0100 Subject: Simplify --- crates/ide/src/syntax_highlighting/injection.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'crates/ide/src/syntax_highlighting') diff --git a/crates/ide/src/syntax_highlighting/injection.rs b/crates/ide/src/syntax_highlighting/injection.rs index 79f6b5359..e97d1be1a 100644 --- a/crates/ide/src/syntax_highlighting/injection.rs +++ b/crates/ide/src/syntax_highlighting/injection.rs @@ -2,7 +2,6 @@ use std::{collections::BTreeMap, convert::TryFrom}; -use ast::{HasQuotes, HasStringValue}; use hir::Semantics; use ide_db::call_info::ActiveParameter; use itertools::Itertools; -- cgit v1.2.3