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++ {
|
for i := 0; i < n; i++ {
|
||||||
var t Token = c.tokenSource.NextToken()
|
var t = c.tokenSource.NextToken()
|
||||||
if PortDebug {
|
if PortDebug {
|
||||||
fmt.Println("fetch loop")
|
fmt.Println("fetch loop")
|
||||||
}
|
}
|
||||||
|
@ -247,7 +247,7 @@ func (c *CommonTokenStream) NextTokenOnChannel(i, channel int) int {
|
||||||
// on channel between i and 0.
|
// on channel between i and 0.
|
||||||
func (c *CommonTokenStream) previousTokenOnChannel(i, channel int) int {
|
func (c *CommonTokenStream) previousTokenOnChannel(i, channel int) int {
|
||||||
for i >= 0 && c.tokens[i].GetChannel() != channel {
|
for i >= 0 && c.tokens[i].GetChannel() != channel {
|
||||||
i --
|
i--
|
||||||
}
|
}
|
||||||
return i
|
return i
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,7 +139,7 @@ func (l *LexerActionExecutor) execute(lexer Lexer, input CharStream, startIndex
|
||||||
}()
|
}()
|
||||||
|
|
||||||
for i := 0; i < len(l.lexerActions); i++ {
|
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 {
|
if la, ok := lexerAction.(*LexerIndexedCustomAction); ok {
|
||||||
var offset = la.offset
|
var offset = la.offset
|
||||||
input.Seek(startIndex + offset)
|
input.Seek(startIndex + offset)
|
||||||
|
|
|
@ -605,7 +605,7 @@ func (p *BaseParser) inContext(context ParserRuleContext) bool {
|
||||||
// the ATN, otherwise {@code false}.
|
// the ATN, otherwise {@code false}.
|
||||||
|
|
||||||
func (p *BaseParser) IsExpectedToken(symbol int) bool {
|
func (p *BaseParser) IsExpectedToken(symbol int) bool {
|
||||||
var atn *ATN = p.Interpreter.atn
|
var atn = p.Interpreter.atn
|
||||||
var ctx = p._ctx
|
var ctx = p._ctx
|
||||||
var s = atn.states[p.state]
|
var s = atn.states[p.state]
|
||||||
var following = atn.NextTokens(s, nil)
|
var following = atn.NextTokens(s, nil)
|
||||||
|
|
|
@ -165,7 +165,7 @@ func (prc *BaseParserRuleContext) GetChildOfType(i int, childType reflect.Type)
|
||||||
return child.(RuleContext)
|
return child.(RuleContext)
|
||||||
}
|
}
|
||||||
|
|
||||||
i --
|
i--
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ func (prc *BaseParserRuleContext) GetToken(ttype int, i int) TerminalNode {
|
||||||
return c2
|
return c2
|
||||||
}
|
}
|
||||||
|
|
||||||
i --
|
i--
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -245,7 +245,7 @@ func (prc *BaseParserRuleContext) getChild(ctxType reflect.Type, i int) RuleCont
|
||||||
return nil
|
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 {
|
for _, o := range prc.children {
|
||||||
|
|
||||||
childType := reflect.TypeOf(o)
|
childType := reflect.TypeOf(o)
|
||||||
|
|
Loading…
Reference in New Issue