Lint: Omit redundant declaration types
This commit is contained in:
parent
5c4e28487e
commit
29b6530a2b
|
@ -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")
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue