google / google/xls

Improve error messaging of undefined parametric bindings.

Open
#663 0 comments 0 reactions 0 assignees View on GitHub
dslx
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

The error message from parsing the following DSLX code:

```
import std

const A = u32:2;

pub fn plus(in0: u32) -> u32 {
in0 + B
}

pub fn plus_two(in0 : u32) -> u32 {
plus(in0)
}
```

is

```
0009: pub fn plus_two(in0 : u32) -> u32 {
0010: plus
(in0)
~~~~~~~~~~~~^^ ParseError: Expected '}', got '<'
0011: }
```

Ideally it would be something along the lines that 'a' is not defined.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.