JuliaLang / JuliaLang/JuliaSyntax.jl

Better error for missing commas in array

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

Description

1. The output of `versioninfo()`
```jl
julia> versioninfo()
Julia Version 1.10.0
Commit 3120989f39b (2023-12-25 18:01 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 32 × 13th Gen Intel(R) Core(TM) i9-13900HX
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, goldmont)
Threads: 1 on 32 virtual cores
```

2. How you installed Julia: `juliaup`

3. MWE
```jl
[
1.0, 2.0
# ......^ missing comma
1e-6, 1e-8,
rand(),
]
```

output
```jl
julia> [
1.0, 2.0
# ......^ missing comma
1e-6, 1e-8,
rand(),
]
ERROR: ParseError:
# Error @ REPL[135]:4:5
# ......^ missing comma
# ┌──────────
1e-6, 1e-8,
rand(),
#───────┘ ── Expected `]`
Stacktrace:
[1] top-level scope
@ none:1
```

Maybe add one more suggestion: "Maybe there is a missing comma in the array, please check"

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.