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)
970970 for i = length (stream. output): - 1 : 1
971971 node = stream. output[i]
972972 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
974976 return byte_pos - 1
975977 end
976- byte_pos -= node. byte_span
977978 end
978979 end
979980 return first_byte (stream) - 1
Original file line number Diff line number Diff line change 497497 " Issue53126()." => :other
498498 " using " => :other
499499 " global xxx::Number = Base." => :other
500+ " let x = 1 # comment" => :other
500501 ]
501502 @testset " $(repr (str)) " begin
502503 # Test :statement parsing
You can’t perform that action at this time.
0 commit comments