Add line/character numbers to errors #1313
Labels
blocked
Waiting for another code change
enhancement
New feature or request
execution
Issues or PRs related to code execution
Line numbers are only in syntax errors right now. Can we add a
Position
to theNode
type? I am thinking there would be a wrapper struct (a newNode
type) which would contain aPosition
and aNodeType
. TheNodeType
would be the currentNode
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 aNode
. 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.
The text was updated successfully, but these errors were encountered: