JuliaLang / JuliaLang/JuliaSyntax.jl

poor handling of incomplete as a ParseError

Open
#366 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
293
Forks
50
PR merge metrics
No merged PRs in 30d

Description

This printing seems to expose internal details:

```
julia> lazy"$(join([], ", "))"
ERROR: syntax: invalid syntax (incomplete #<julia: Base.Meta.ParseError(msg="ParseError:
# Error @ REPL[1]:1:11
(join([],
# └ ── Expected `)`", detail=Base.JuliaSyntax.ParseError(source=Base.JuliaSyntax.SourceFile(code=Base.SubString{String}(string="$(join([], ", offset=1, ncodeunits=10), byte_offset=1, filename="REPL[1]", first_line=1, line_starts=Array{Int64, (2,)}[1, 11]), diagnostics=Array{Base.JuliaSyntax.Diagnostic, (2,)}[Base.JuliaSyntax.Diagnostic(first_byte=12, last_byte=11, level=:error, message="Expected `)`"), Base.JuliaSyntax.Diagnostic(first_byte=12, last_byte=11, level=:error, message="Expected `)`")], incomplete_tag=:other))>)
Stacktrace:
[1] top-level scope
@ REPL[1]:1
```

from https://github.com/JuliaLang/julia/issues/51654

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.