mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-16 17:58:16 +00:00
Add todo
This commit is contained in:
parent
9f91901f7e
commit
eb4004fdb8
1 changed files with 2 additions and 1 deletions
|
@ -100,7 +100,8 @@ fn previous_non_triva_element(element: SyntaxElement) -> Option<SyntaxElement> {
|
|||
})?;
|
||||
non_trivia_sibling(NodeOrToken::Node(prev_sibling_node), Direction::Prev)?
|
||||
};
|
||||
//I think you can avoid this loop if you use SyntaxToken::prev_token -- unlike prev_sibling_or_token, it works across parents.
|
||||
// TODO: Check if this can be simplified
|
||||
// Matklad: I think you can avoid this loop if you use SyntaxToken::prev_token -- unlike prev_sibling_or_token, it works across parents.
|
||||
// traversing the tree down to get the last token or node, i.e. the closest one
|
||||
loop {
|
||||
if let Some(token) = wrapped.as_token() {
|
||||
|
|
Loading…
Reference in a new issue