amber-lang / amber-lang/amber

[Feature] Compiler should be able to emit multiple errors

未关闭
#667 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
compiler syntax
主要语言
Rust
星标
5.2k
派生
145
平均合并
5 天 3 小时
30 天内合并 PR
7

描述

**Is your feature request related to a problem? Please describe.**
If there is more than one error in the code, the compiler will always emit only one:

for this code:

```ab
fun say_hi(name: Text) {
echo "hi " + name
}

say_hi("li hua")
say_hi(123)
say_hi(123)
```

compiler errors out with:

```
ERROR 1st argument 'name' of function 'say_hi' expects type 'Text', but 'Num' was given
at test.ab:5:1

4| say_hi("li hua")
5| say_hi(123)
6| say_hi(123)
```

**Describe the solution you'd like**
something like this:

```
ERROR 1st argument 'name' of function 'say_hi' expects type 'Text', but 'Num' was given
at test.ab:5:1

4| say_hi("li hua")
5| say_hi(123)
6| say_hi(123)

ERROR 1st argument 'name' of function 'say_hi' expects type 'Text', but 'Num' was given
at test.ab:6:1

5| say_hi(123)
6| say_hi(123)
```

**Describe alternatives you've considered**
leave it as is because it might not be worth the major restructuring efforts

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。