JuliaLang / JuliaSyntax.jl

The Julia compiler frontend
Other
272 stars 35 forks source link

Error message for ternary assumes `:` was present. #429

Open Zentrik opened 5 months ago

Zentrik commented 5 months ago

The error message could be improved to say that : was missing:

julia> (x ? 4)
ERROR: ParseError:
# Error @ REPL[1]:1:7
(x ? 4)
#     └ ── space required before `:` in `?` expression
Stacktrace:
 [1] top-level scope
   @ none:1

This was on 1.10.2 but I see the same on nightly.