diff --git a/runtime/Go/antlr/common_token_stream.go b/runtime/Go/antlr/common_token_stream.go index d03502eae..aa520dd39 100644 --- a/runtime/Go/antlr/common_token_stream.go +++ b/runtime/Go/antlr/common_token_stream.go @@ -154,7 +154,7 @@ func (c *CommonTokenStream) fetch(n int) int { } for i := 0; i < n; i++ { - var t Token = c.tokenSource.NextToken() + var t = c.tokenSource.NextToken() if PortDebug { fmt.Println("fetch loop") } @@ -247,7 +247,7 @@ func (c *CommonTokenStream) NextTokenOnChannel(i, channel int) int { // on channel between i and 0. func (c *CommonTokenStream) previousTokenOnChannel(i, channel int) int { for i >= 0 && c.tokens[i].GetChannel() != channel { - i -- + i-- } return i } diff --git a/runtime/Go/antlr/lexer_action_executor.go b/runtime/Go/antlr/lexer_action_executor.go index 05a4efffc..b69414f29 100644 --- a/runtime/Go/antlr/lexer_action_executor.go +++ b/runtime/Go/antlr/lexer_action_executor.go @@ -139,7 +139,7 @@ func (l *LexerActionExecutor) execute(lexer Lexer, input CharStream, startIndex }() for i := 0; i < len(l.lexerActions); i++ { - var lexerAction LexerAction = l.lexerActions[i] + var lexerAction = l.lexerActions[i] if la, ok := lexerAction.(*LexerIndexedCustomAction); ok { var offset = la.offset input.Seek(startIndex + offset) diff --git a/runtime/Go/antlr/parser.go b/runtime/Go/antlr/parser.go index 5f1cdadb5..4e556b0b7 100644 --- a/runtime/Go/antlr/parser.go +++ b/runtime/Go/antlr/parser.go @@ -605,7 +605,7 @@ func (p *BaseParser) inContext(context ParserRuleContext) bool { // the ATN, otherwise {@code false}. func (p *BaseParser) IsExpectedToken(symbol int) bool { - var atn *ATN = p.Interpreter.atn + var atn = p.Interpreter.atn var ctx = p._ctx var s = atn.states[p.state] var following = atn.NextTokens(s, nil) diff --git a/runtime/Go/antlr/parser_rule_context.go b/runtime/Go/antlr/parser_rule_context.go index 7921440e9..e3d34b294 100644 --- a/runtime/Go/antlr/parser_rule_context.go +++ b/runtime/Go/antlr/parser_rule_context.go @@ -165,7 +165,7 @@ func (prc *BaseParserRuleContext) GetChildOfType(i int, childType reflect.Type) return child.(RuleContext) } - i -- + i-- } } @@ -210,7 +210,7 @@ func (prc *BaseParserRuleContext) GetToken(ttype int, i int) TerminalNode { return c2 } - i -- + i-- } } } @@ -245,7 +245,7 @@ func (prc *BaseParserRuleContext) getChild(ctxType reflect.Type, i int) RuleCont return nil } - var j int = -1 // what element have we found with ctxType? + var j = -1 // what element have we found with ctxType? for _, o := range prc.children { childType := reflect.TypeOf(o)