diff options
author | Aleksey Kladov <[email protected]> | 2020-04-10 16:06:57 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-04-10 16:07:09 +0100 |
commit | 5c5bde47fb759440d007c90fd83021de538120b8 (patch) | |
tree | 4bc012bfc0c2428bc4dee692a1ea2388152a4269 /crates/ra_ide | |
parent | d4332760d81c5575dd04b39275c4979b59bb9fc4 (diff) |
Rename some tokens
Diffstat (limited to 'crates/ra_ide')
-rw-r--r-- | crates/ra_ide/src/completion/complete_trait_impl.rs | 4 | ||||
-rw-r--r-- | crates/ra_ide/src/syntax_tree.rs | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_ide/src/completion/complete_trait_impl.rs b/crates/ra_ide/src/completion/complete_trait_impl.rs index ded1ff3bc..fab02945c 100644 --- a/crates/ra_ide/src/completion/complete_trait_impl.rs +++ b/crates/ra_ide/src/completion/complete_trait_impl.rs | |||
@@ -35,7 +35,7 @@ use hir::{self, Docs, HasSource}; | |||
35 | use ra_assists::utils::get_missing_impl_items; | 35 | use ra_assists::utils::get_missing_impl_items; |
36 | use ra_syntax::{ | 36 | use ra_syntax::{ |
37 | ast::{self, edit, ImplDef}, | 37 | ast::{self, edit, ImplDef}, |
38 | AstNode, SyntaxKind, SyntaxNode, TextRange, | 38 | AstNode, SyntaxKind, SyntaxNode, TextRange, T, |
39 | }; | 39 | }; |
40 | use ra_text_edit::TextEdit; | 40 | use ra_text_edit::TextEdit; |
41 | 41 | ||
@@ -204,7 +204,7 @@ fn make_const_compl_syntax(const_: &ast::ConstDef) -> String { | |||
204 | let end = const_ | 204 | let end = const_ |
205 | .syntax() | 205 | .syntax() |
206 | .children_with_tokens() | 206 | .children_with_tokens() |
207 | .find(|s| s.kind() == SyntaxKind::SEMI || s.kind() == SyntaxKind::EQ) | 207 | .find(|s| s.kind() == T![;] || s.kind() == T![=]) |
208 | .map_or(const_end, |f| f.text_range().start()); | 208 | .map_or(const_end, |f| f.text_range().start()); |
209 | 209 | ||
210 | let len = end - start; | 210 | let len = end - start; |
diff --git a/crates/ra_ide/src/syntax_tree.rs b/crates/ra_ide/src/syntax_tree.rs index f58e436d1..5842ae2e8 100644 --- a/crates/ra_ide/src/syntax_tree.rs +++ b/crates/ra_ide/src/syntax_tree.rs | |||
@@ -165,7 +165,7 @@ SOURCE_FILE@[0; 60) | |||
165 | PATH_SEGMENT@[16; 22) | 165 | PATH_SEGMENT@[16; 22) |
166 | NAME_REF@[16; 22) | 166 | NAME_REF@[16; 22) |
167 | IDENT@[16; 22) "assert" | 167 | IDENT@[16; 22) "assert" |
168 | EXCL@[22; 23) "!" | 168 | BANG@[22; 23) "!" |
169 | TOKEN_TREE@[23; 57) | 169 | TOKEN_TREE@[23; 57) |
170 | L_PAREN@[23; 24) "(" | 170 | L_PAREN@[23; 24) "(" |
171 | STRING@[24; 52) "\"\n fn foo() {\n ..." | 171 | STRING@[24; 52) "\"\n fn foo() {\n ..." |
@@ -173,7 +173,7 @@ SOURCE_FILE@[0; 60) | |||
173 | WHITESPACE@[53; 54) " " | 173 | WHITESPACE@[53; 54) " " |
174 | STRING@[54; 56) "\"\"" | 174 | STRING@[54; 56) "\"\"" |
175 | R_PAREN@[56; 57) ")" | 175 | R_PAREN@[56; 57) ")" |
176 | SEMI@[57; 58) ";" | 176 | SEMICOLON@[57; 58) ";" |
177 | WHITESPACE@[58; 59) "\n" | 177 | WHITESPACE@[58; 59) "\n" |
178 | R_CURLY@[59; 60) "}" | 178 | R_CURLY@[59; 60) "}" |
179 | "# | 179 | "# |
@@ -226,7 +226,7 @@ EXPR_STMT@[16; 58) | |||
226 | PATH_SEGMENT@[16; 22) | 226 | PATH_SEGMENT@[16; 22) |
227 | NAME_REF@[16; 22) | 227 | NAME_REF@[16; 22) |
228 | IDENT@[16; 22) "assert" | 228 | IDENT@[16; 22) "assert" |
229 | EXCL@[22; 23) "!" | 229 | BANG@[22; 23) "!" |
230 | TOKEN_TREE@[23; 57) | 230 | TOKEN_TREE@[23; 57) |
231 | L_PAREN@[23; 24) "(" | 231 | L_PAREN@[23; 24) "(" |
232 | STRING@[24; 52) "\"\n fn foo() {\n ..." | 232 | STRING@[24; 52) "\"\n fn foo() {\n ..." |
@@ -234,7 +234,7 @@ EXPR_STMT@[16; 58) | |||
234 | WHITESPACE@[53; 54) " " | 234 | WHITESPACE@[53; 54) " " |
235 | STRING@[54; 56) "\"\"" | 235 | STRING@[54; 56) "\"\"" |
236 | R_PAREN@[56; 57) ")" | 236 | R_PAREN@[56; 57) ")" |
237 | SEMI@[57; 58) ";" | 237 | SEMICOLON@[57; 58) ";" |
238 | "# | 238 | "# |
239 | .trim() | 239 | .trim() |
240 | ); | 240 | ); |