How would I retrieve the location (as line and column) of an erroneous token during semantic analysis?
Example:
int x = 4;
int x = -2;
When the compiler reaches the second line, I want it to produce an error like:
Duplicate variable 'x' in line 2 column 5