mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
ra_syntax: changed added diagnostics information returned from tokenize() (implemented with iterators)
This commit is contained in:
parent
b090ee5a65
commit
ad24976da3
4 changed files with 242 additions and 79 deletions
|
@ -46,8 +46,7 @@ fn reparse_token<'node>(
|
|||
WHITESPACE | COMMENT | IDENT | STRING | RAW_STRING => {
|
||||
if token.kind() == WHITESPACE || token.kind() == COMMENT {
|
||||
// removing a new line may extends previous token
|
||||
if token.text().to_string()[edit.delete - token.text_range().start()].contains('\n')
|
||||
{
|
||||
if token.text()[edit.delete - token.text_range().start()].contains('\n') {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue