Skip to content

Location in AnalyzeVariableDeclaration error #7

@nedroden

Description

@nedroden

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions