Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion tool/src/org/antlr/v4/codegen/target/GoTarget.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ public class GoTarget extends Target {
"SetInvokingState", "SetParent", "String",

// misc
"rule", "parserRule", "action"
"rule", "parserRule", "action",

// the use of start or stop abd others as a label name will cause the generation of a GetStart() or GetStop() method, which
// then clashes with the GetStart() or GetStop() method that is generated by the code gen for the rule. So, we need to
// convert it. This is not ideal as it will still probably confuse authors of parse listeners etc. but the code will
// compile. This is a proof of Hyrum's law.
"start", "stop", "exception"
));

private static final boolean DO_GOFMT = !Boolean.parseBoolean(System.getenv("ANTLR_GO_DISABLE_GOFMT"))
Expand Down