JuliaSyntax.jl icon indicating copy to clipboard operation
JuliaSyntax.jl copied to clipboard

"ambiguous `.` syntax" errors could be more concrete

Open aplavin opened this issue 1 year ago • 0 comments

Now:

julia> 10.^(1:5)
ERROR: ParseError:
# Error @ REPL[1]:1:1
10.^(1:5)
└─┘ ── ambiguous `.` syntax; add whitespace to clarify (eg `1.+2` might be `1.0+2` or `1 .+ 2`)

Would be nice and immediately understandable to show the actual code a user typed – instead of some random example:

julia> 10.^(1:5)
ERROR: ParseError:
# Error @ REPL[1]:1:1
10.^(1:5)
└─┘ ── ambiguous `.` syntax, `10.^(1:5)` might be `10. ^ (1:5)` or `10 .^ (1:5)`; add whitespace to clarify

aplavin avatar Sep 22 '24 00:09 aplavin