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

Bad error message for missing end

Open oscardssmith opened this issue 6 months ago • 1 comments

Right now the error for missing an end in otherwise good code is

ERROR: LoadError: ParseError:
# Error @ /home/oscardssmith/.julia/dev/OrdinaryDiffEq/src/derivative_utils.jl:766:5
    end
end
#  
└ ── Expected `end`

The problem here is that the error location reported is just the end of the file (since everything else could be correct up to that point). It would be much better if the error instead (or in addition) pointed to the line requiring an end from which an end was missing since this line will generally be much more useful for figuring out where the missing end is supposed to go.

oscardssmith avatar Jul 26 '24 20:07 oscardssmith