Closed c42f closed 7 months ago
Probably related to the case parseall(Expr, "for\n\n<:", ignore_errors=true) in #380, we have this case of misparsing, but without an error:
parseall(Expr, "for\n\n<:", ignore_errors=true)
julia> parseall(Expr, "a +\n\n>:", ignore_errors=true) :($(Expr(:toplevel, :(#= line 1 =#), :(+a), :(#= line 3 =#), :>:))) julia> parseall(SyntaxNode, "a +\n\n>:", ignore_errors=true) line:col│ tree │ file_name 1:1 │[toplevel] 1:1 │ [call-i] 1:1 │ a 1:3 │ + 3:1 │ >:
This seems likely to be due to the special handling of >: and <: operators.
>:
<:
A second evil example where we produce incorrect output:
julia> parseall(SyntaxNode, "a +\n>:", ignore_errors=true) line:col│ tree │ file_name 1:1 │[toplevel] 1:1 │ [call-i] 1:1 │ a 1:3 │ + 1:4 │ [>:-pre] 2:1 │ >:
Probably related to the case
parseall(Expr, "for\n\n<:", ignore_errors=true)
in #380, we have this case of misparsing, but without an error:This seems likely to be due to the special handling of
>:
and<:
operators.A second evil example where we produce incorrect output: