JuliaLang / JuliaLang/JuliaSyntax.jl

Error message regression when missing `)`

Open
#348 0 comments 1 reaction 0 assignees View on GitHub
error messages
Dominant language
Julia
Stars
293
Forks
50
PR merge metrics
No merged PRs in 30d

Description

I'm missing a `)`, but the new error message doesn't make that as clear as the old one.

Julia 1.0
```julia
julia> quote
const $(esc(Symbol(name)) = 4
export $(esc(Symbol(name))
end
ERROR: syntax: missing comma or ) in argument list
```

Julia 1.10
```julia
julia> quote
const $(esc(Symbol(name)) = 4
export $(esc(Symbol(name))
end
ERROR: ParseError:
# Error @ REPL[10]:2:5
quote
# ┌────────────────────────────
const $(esc(Symbol(name)) = 4
export $(esc(Symbol(name))
#───────────────────────────┘ ── expected assignment after `const`
# Error @ REPL[10]:3:5
const $(esc(Symbol(name)) = 4
export $(esc(Symbol(name))
# └──────────────────────┘ ── Expected `)`
# Error @ REPL[10]:3:30
const $(esc(Symbol(name)) = 4
export $(esc(Symbol(name))
# └ ── Expected `end`
# Error @ REPL[10]:3:30
const $(esc(Symbol(name)) = 4
export $(esc(Symbol(name))
# ╙ ── extra tokens after end of expression
# Error @ REPL[10]:4:1
export $(esc(Symbol(name))
end
└─┘ ── invalid identifier
Stacktrace:
[1] top-level scope
@ none:1
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.