diff options
author | Mikhail Rakhmanov <[email protected]> | 2020-06-11 13:32:14 +0100 |
---|---|---|
committer | Mikhail Rakhmanov <[email protected]> | 2020-06-11 13:32:14 +0100 |
commit | eb4004fdb8f4cef602581d1fb35e515748d586cb (patch) | |
tree | 35609368bc6ae99e497a480122330192f13679a6 /crates | |
parent | 9f91901f7e55915b359909b5422c03f70e4ab79b (diff) |
Add todo
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_ide/src/completion/patterns.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_ide/src/completion/patterns.rs b/crates/ra_ide/src/completion/patterns.rs index b55f23fbe..145f01786 100644 --- a/crates/ra_ide/src/completion/patterns.rs +++ b/crates/ra_ide/src/completion/patterns.rs | |||
@@ -100,7 +100,8 @@ fn previous_non_triva_element(element: SyntaxElement) -> Option<SyntaxElement> { | |||
100 | })?; | 100 | })?; |
101 | non_trivia_sibling(NodeOrToken::Node(prev_sibling_node), Direction::Prev)? | 101 | non_trivia_sibling(NodeOrToken::Node(prev_sibling_node), Direction::Prev)? |
102 | }; | 102 | }; |
103 | //I think you can avoid this loop if you use SyntaxToken::prev_token -- unlike prev_sibling_or_token, it works across parents. | 103 | // TODO: Check if this can be simplified |
104 | // Matklad: I think you can avoid this loop if you use SyntaxToken::prev_token -- unlike prev_sibling_or_token, it works across parents. | ||
104 | // traversing the tree down to get the last token or node, i.e. the closest one | 105 | // traversing the tree down to get the last token or node, i.e. the closest one |
105 | loop { | 106 | loop { |
106 | if let Some(token) = wrapped.as_token() { | 107 | if let Some(token) = wrapped.as_token() { |