diff --git a/tool/resources/org/antlr/v4/tool/templates/codegen/Go/Go.stg b/tool/resources/org/antlr/v4/tool/templates/codegen/Go/Go.stg index 43ee7c6d7a..8c81547244 100644 --- a/tool/resources/org/antlr/v4/tool/templates/codegen/Go/Go.stg +++ b/tool/resources/org/antlr/v4/tool/templates/codegen/Go/Go.stg @@ -644,10 +644,7 @@ p.GetErrorHandler().Sync(p) - -la_ := p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), , p.GetParserRuleContext()) - -switch la_ { +switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), , p.GetParserRuleContext()) { : }; separator="\n\n"> @@ -658,10 +655,10 @@ switch la_ { OptionalBlock(choice, alts, error) ::= << p.SetState() p.GetErrorHandler().Sync(p) -la_ := p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), , p.GetParserRuleContext()) + -+1 { +, p.GetParserRuleContext()) == +1 { }; separator="} else ">