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 1fe687029..d4e0ffe39 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 @@ -210,9 +210,9 @@ func (l *) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex var t *Context = nil if localctx != nil { t = localctx.(*) \} - return l._Sempred(t, predIndex); + return l._Sempred(t, predIndex) - return l._Sempred(localctx, predIndex); + return l._Sempred(localctx, predIndex) }; separator="\n"> default: panic("No registered predicate for:" + fmt.Sprint(ruleIndex)) @@ -649,7 +649,7 @@ ContextTokenListIndexedGetterDecl(t) ::=<< ContextRuleGetterDecl(r) ::=<< () I { - v := s.GetTypedRuleContext( reflect.TypeOf((*I)(nil)).Elem(),0); + v := s.GetTypedRuleContext( reflect.TypeOf((*I)(nil)).Elem(),0) if v == nil { return nil @@ -666,7 +666,7 @@ fail: ContextRuleListGetterDecl should never be called! ContextRuleListIndexedGetterDecl(r) ::=<< (i int) []I { - var ts []antlr.RuleContext; + var ts []antlr.RuleContext if i \< 0 { ts = s.GetTypedRuleContexts( reflect.TypeOf((*I)(nil)).Elem())