JuliaLang / JuliaSyntax.jl

The Julia compiler frontend
Other
267 stars 32 forks source link

Excessive error messages for incomplete ternary #357

Closed Keno closed 7 months ago

Keno commented 9 months ago
julia> Fact?
ERROR: ParseError:
# Error @ REPL[3]:1:5
Fact?
#   └ ── space required before `?` operator
# Error @ REPL[3]:1:6
Fact?
#    └ ── space required after `?` operator
# Error @ REPL[3]:1:6
Fact?
#    └ ── premature end of input
# Error @ REPL[3]:1:6
Fact?
#    └ ── space required before `:` in `?` expression
# Error @ REPL[3]:1:6
Fact?
#    └ ── `:` expected in `?` expression
# Error @ REPL[3]:1:6
Fact?
#    └ ── space required after `:` in `?` expression
# Error @ REPL[3]:1:6
Fact?
#    └ ── premature end of input
Stacktrace:
 [1] top-level scope
   @ none:1
c42f commented 7 months ago

This is fixed (or worked around) - we now only print the first error message.