-
Notifications
You must be signed in to change notification settings - Fork 0
Location in AnalyzeVariableDeclaration error #7
Copy link
Copy link
Open
Milestone
Description
In the Analyzer::AnalyzeVariableDeclaration method, a check is performed to determine whether or not the assignment is illegal / prone to loss of information. However, in case of duplicate variable names (think of i in iterators), it is not really clear what variable the message is referring to (since it only states the variable name).
What we would want is to print the location of the corresponding variable.
This, however, also requires a change in the parser, since as of today the location is not included in the AST. This means that whenever a node is created, the token location should be included in the resulting node.
Reactions are currently unavailable