Closed piacenti closed 6 months ago
Thanks! Will have a look soon. It's strange tho because I did test this exact scenario, and in JS I did not have conflicts reported.
Not sure if this makes any difference but the grammar has something like this in the rule
TYPE type=type_XYZ
So there is both a TYPE token and a type label to simplify navigation to one of many different type configurations. The $TYPE token is referenced in the predicate
I'm not sure if we can have something that works in all platforms to be honest.
If you have time, some kind of reproducer would help, I can't seem to get the same result.
Nevermind, reproduced!
The most recent version improved several things. However, it seems that If I have a predicate or action that references a token it can have issues in JS![image](https://github.com/Strumenta/antlr-kotlin/assets/7397483/a563d9d4-c5bd-431f-8af6-c2e9be1137a2)
I'm currently solving this by appending an underscore for the local variable created that is referenced from the predicate/action