ra_syntax: changed added diagnostics information returned from tokenize() (implemented with iterators)

This commit is contained in:
Veetaha 2020-01-24 03:39:23 +02:00
parent b090ee5a65
commit ad24976da3
4 changed files with 242 additions and 79 deletions

View file

@ -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;
}
}