diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-05-13 14:49:14 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-05-13 14:49:14 +0100 |
commit | 033a32f34944d7e07facd900a78db59b35e6698c (patch) | |
tree | 82c24d2ab03a0631d55010c0ebcc41116e3e25b8 /crates/ra_ide_api/src | |
parent | b22614f0b500c351d3abf33a4ed6beaea6861bca (diff) | |
parent | 57bb618fd3f11d9ac817f76a965316723aa69ee9 (diff) |
Merge #1257
1257: Implemented tkn! macro for syntax kinds r=matklad a=pasa
Implementation of #1248
Co-authored-by: Sergey Parilin <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r-- | crates/ra_ide_api/src/extend_selection.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/extend_selection.rs b/crates/ra_ide_api/src/extend_selection.rs index 7293ba359..163fa8c3c 100644 --- a/crates/ra_ide_api/src/extend_selection.rs +++ b/crates/ra_ide_api/src/extend_selection.rs | |||
@@ -4,6 +4,7 @@ use ra_syntax::{ | |||
4 | algo::{find_covering_element, find_token_at_offset, TokenAtOffset}, | 4 | algo::{find_covering_element, find_token_at_offset, TokenAtOffset}, |
5 | SyntaxKind::*, SyntaxToken, | 5 | SyntaxKind::*, SyntaxToken, |
6 | ast::{self, AstNode, AstToken}, | 6 | ast::{self, AstNode, AstToken}, |
7 | T | ||
7 | }; | 8 | }; |
8 | 9 | ||
9 | use crate::{FileRange, db::RootDatabase}; | 10 | use crate::{FileRange, db::RootDatabase}; |
@@ -135,7 +136,7 @@ fn pick_best<'a>(l: SyntaxToken<'a>, r: SyntaxToken<'a>) -> SyntaxToken<'a> { | |||
135 | fn priority(n: SyntaxToken) -> usize { | 136 | fn priority(n: SyntaxToken) -> usize { |
136 | match n.kind() { | 137 | match n.kind() { |
137 | WHITESPACE => 0, | 138 | WHITESPACE => 0, |
138 | IDENT | SELF_KW | SUPER_KW | CRATE_KW | LIFETIME => 2, | 139 | IDENT | T![self] | T![super] | T![crate] | LIFETIME => 2, |
139 | _ => 1, | 140 | _ => 1, |
140 | } | 141 | } |
141 | } | 142 | } |