File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
tool/src/org/antlr/v4/codegen/target Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,13 @@ public class GoTarget extends Target {
44
44
"SetInvokingState" , "SetParent" , "String" ,
45
45
46
46
// misc
47
- "rule" , "parserRule" , "action"
47
+ "rule" , "parserRule" , "action" ,
48
+
49
+ // the use of start or stop abd others as a label name will cause the generation of a GetStart() or GetStop() method, which
50
+ // then clashes with the GetStart() or GetStop() method that is generated by the code gen for the rule. So, we need to
51
+ // convert it. This is not ideal as it will still probably confuse authors of parse listeners etc. but the code will
52
+ // compile. This is a proof of Hyrum's law.
53
+ "start" , "stop" , "exception"
48
54
));
49
55
50
56
private static final boolean DO_GOFMT = !Boolean .parseBoolean (System .getenv ("ANTLR_GO_DISABLE_GOFMT" ))
You can’t perform that action at this time.
0 commit comments