aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/syntax_tree.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-11-06 21:21:56 +0000
committerAleksey Kladov <[email protected]>2020-11-06 21:23:14 +0000
commit5ba4f949c23dcf53f34995c90b7c01e6c641b1f0 (patch)
treefe5064dde4e948a776c87d38fba972903acad3ec /crates/ide/src/syntax_tree.rs
parent6725dcf847300b9cddcbb061b159317113860f31 (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_tree.rs')
-rw-r--r--crates/ide/src/syntax_tree.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/ide/src/syntax_tree.rs b/crates/ide/src/syntax_tree.rs
index 7941610d6..6dd05c05d 100644
--- a/crates/ide/src/syntax_tree.rs
+++ b/crates/ide/src/syntax_tree.rs
@@ -1,9 +1,7 @@
1use ide_db::base_db::{FileId, SourceDatabase}; 1use ide_db::base_db::{FileId, SourceDatabase};
2use ide_db::RootDatabase; 2use ide_db::RootDatabase;
3use syntax::{ 3use syntax::{
4 algo, AstNode, NodeOrToken, SourceFile, 4 algo, AstNode, NodeOrToken, SourceFile, SyntaxKind::STRING, SyntaxToken, TextRange, TextSize,
5 SyntaxKind::{RAW_STRING, STRING},
6 SyntaxToken, TextRange, TextSize,
7}; 5};
8 6
9// Feature: Show Syntax Tree 7// Feature: Show Syntax Tree
@@ -46,7 +44,7 @@ fn syntax_tree_for_string(token: &SyntaxToken, text_range: TextRange) -> Option<
46 // we'll attempt parsing it as rust syntax 44 // we'll attempt parsing it as rust syntax
47 // to provide the syntax tree of the contents of the string 45 // to provide the syntax tree of the contents of the string
48 match token.kind() { 46 match token.kind() {
49 STRING | RAW_STRING => syntax_tree_for_token(token, text_range), 47 STRING => syntax_tree_for_token(token, text_range),
50 _ => None, 48 _ => None,
51 } 49 }
52} 50}