Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add line/character numbers to errors #1313

Open
macmv opened this issue Jun 9, 2021 · 2 comments
Open

Add line/character numbers to errors #1313

macmv opened this issue Jun 9, 2021 · 2 comments
Labels
blocked Waiting for another code change enhancement New feature or request execution Issues or PRs related to code execution

Comments

@macmv
Copy link
Contributor

macmv commented Jun 9, 2021

Line numbers are only in syntax errors right now. Can we add a Position to the Node type? I am thinking there would be a wrapper struct (a new Node type) which would contain a Position and a NodeType. The NodeType would be the current Node enum. This would mean we can store various parsing information with each node, and also produce line/character numbers when we hit undefined variables.

This would also mean that StatmentList would store a list of these new nodes, and so would everything else that stores a Node. It would add a bit of memory overhead, but other than that it shouldn't have any significant performance impact.

I can start working on this, but I would like some feedback before I go ahead with this. It seems like a large enough change that I don't think a PR with this feature would be merged out of nowhere.

@Razican
Copy link
Member

Razican commented Jun 9, 2021

This is blocked until #1295 lands.

@Razican Razican added blocked Waiting for another code change enhancement New feature or request execution Issues or PRs related to code execution labels Jun 9, 2021
@Razican Razican added this to the v0.13.0 milestone Jun 9, 2021
@raskad raskad modified the milestones: v0.13.0, v0.14.0 Sep 25, 2021
@Razican Razican modified the milestones: v0.14.0, v0.15.0 Feb 5, 2022
@Razican
Copy link
Member

Razican commented Feb 5, 2022

Waiting for #300 to be implemented.

@Razican Razican modified the milestones: v0.15.0, v0.16.0 Jun 1, 2022
@Razican Razican removed this from the v0.16.0 milestone Sep 19, 2022
bors bot pushed a commit that referenced this issue Jan 31, 2023
Slightly related to #2411 since we need an API to pass module files, but more useful for #1760, #1313 and other error reporting issues.

It changes the following:

- Introduces a new `Source` API to store the path of a provided file or `None` if the source is a plain string.
- Improves the display of `boa_tester` to show the path of the tests being run. This also enables hyperlinks to directly jump to the tested file from the VS terminal.
- Adjusts the repo to this change.

Hopefully, this will improve our error display in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Waiting for another code change enhancement New feature or request execution Issues or PRs related to code execution
Projects
None yet
Development

No branches or pull requests

3 participants