Lint: Omit redundant declaration types

This commit is contained in:
Will Faught 2016-05-21 00:22:20 -07:00
parent 5c4e28487e
commit 29b6530a2b
4 changed files with 7 additions and 7 deletions

View File

@ -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
}

View File

@ -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)

View File

@ -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)

View File

@ -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)