JuliaLang / JuliaSyntax.jl

The Julia compiler frontend
Other
266 stars 32 forks source link

Generator syntax incorrectly parses extra code vs Julia 1.6 parser #428

Closed mkitti closed 3 months ago

mkitti commented 3 months ago

Julia 1.10.2:

julia> (x for x in 1:5 6)
6

Julia 1.6

julia> (x for x in 1:5 5)
ERROR: syntax: expected ")"

I originally discovered this error in 1.10.2 by trying to run the following and thinking that Julia may have gotten too smart.

julia> (x for x in in 1:5)
1:5
pfitzseb commented 3 months ago

Dup of https://github.com/JuliaLang/JuliaSyntax.jl/issues/407.