File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -970,10 +970,11 @@ function last_non_whitespace_byte(stream::ParseStream)
970
970
for i = length (stream. output): - 1 : 1
971
971
node = stream. output[i]
972
972
if is_terminal (node)
973
- if ! (kind (node) in KSet " Comment Whitespace NewlineWs ErrorEofMultiComment" )
973
+ if kind (node) in KSet " Comment Whitespace NewlineWs ErrorEofMultiComment" || kind (node) == K " error" && node. byte_span == 0
974
+ byte_pos -= node. byte_span
975
+ else
974
976
return byte_pos - 1
975
977
end
976
- byte_pos -= node. byte_span
977
978
end
978
979
end
979
980
return first_byte (stream) - 1
Original file line number Diff line number Diff line change 497
497
" Issue53126()." => :other
498
498
" using " => :other
499
499
" global xxx::Number = Base." => :other
500
+ " let x = 1 # comment" => :other
500
501
]
501
502
@testset " $(repr (str)) " begin
502
503
# Test :statement parsing
You can’t perform that action at this time.
0 commit comments