Get older token file
This commit is contained in:
parent
b5c5ce2188
commit
4254fb63c6
|
@ -14,10 +14,6 @@ type TokenSourceCharStreamPair struct {
|
||||||
charStream CharStream
|
charStream CharStream
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewTokenSourceCharStreamPair(source TokenSource, stream CharStream) *TokenSourceCharStreamPair {
|
|
||||||
return &TokenSourceCharStreamPair{source, stream}
|
|
||||||
}
|
|
||||||
|
|
||||||
// A token has properties: text, type, line, character position in the line
|
// A token has properties: text, type, line, character position in the line
|
||||||
// (so we can ignore tabs), token channel, index, and source from which
|
// (so we can ignore tabs), token channel, index, and source from which
|
||||||
// we obtained this token.
|
// we obtained this token.
|
||||||
|
@ -208,7 +204,7 @@ func (c *CommonToken) String() string {
|
||||||
ch = ""
|
ch = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
return "[" + "channel:" + strconv.Itoa(c.channel) + " @" + strconv.Itoa(c.tokenIndex) + "," + strconv.Itoa(c.start) + ":" + strconv.Itoa(c.stop) + "='" +
|
return "[@" + strconv.Itoa(c.tokenIndex) + "," + strconv.Itoa(c.start) + ":" + strconv.Itoa(c.stop) + "='" +
|
||||||
txt + "',<" + strconv.Itoa(c.tokenType) + ">" +
|
txt + "',<" + strconv.Itoa(c.tokenType) + ">" +
|
||||||
ch + "," + strconv.Itoa(c.line) + ":" + strconv.Itoa(c.column) + "]"
|
ch + "," + strconv.Itoa(c.line) + ":" + strconv.Itoa(c.column) + "]"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue