JuliaLang / JuliaSyntax.jl

The Julia compiler frontend
Other
272 stars 35 forks source link

Error message could suggest comma instead of `)` #363

Closed jakobnissen closed 1 year ago

jakobnissen commented 1 year ago

In the example:

julia> foo(a b)
ERROR: ParseError:
# Error @ REPL[2]:1:7
foo(a b)
#     ╙ ── Expected `)`

It would be better to suggest adding a , rather than a ). I don't know if this is feasible since it probably requires parsing ahead in front of the parser error to find the missing )

KristofferC commented 1 year ago

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