I tagged this a few days ago, but forgot to announce, so here goes:
The FancyDiagnostics package is now available on a julia 0.6 near you. It uses CSTParser to replace the built-in julia parser and provide nicer error messages:
The new parser is activated as soon as the FancyDiagnostics package is loaded,
no further steps necessary. Coverage of syntax errors is not as comprehensive as the base julia parser right now, but should improve as CSTParser gets better. Let me know if you run into any trouble.
I’d also like to acknowledge the Sloan foundation for funding part of this work.
julia> using FancyDiagnostics
julia> omitting /Users/malmaud/.julia/v0.6/AbstractTrees/src/AbstractTrees.jl due to parsing error near line 16omitting /Users/malmaud/.julia/v0.6/CSTParser/src/CSTParser.jl due to parsing error near line 6omitting /Users/malmaud/.julia/v0.6/FancyDiagnostics/src/display.jl due to parsing error near line 5
julia> REPL:15:20 REPL:4:14 REPL:5:27 ERRORERRORERROR: Unexpected )
include("traits.jl")
: ^Unexpected operator
global debug = true
: ^Unexpected )
diag_code(D::Diagnostic{C}) where {C} = C