func (t *Token) TypeID() string {
    return t.Type().ID()
}
TypeID returns the token Type ID of t.
This may be different from the literal of token t.
package token
import(
    "fmt"
)
type Token struct {
    typ        Type
    lext, rext int
    input      []rune
}
func New(t Type, lext, rext int, input []rune) *Token {
    return &Token{
        typ:   t,
        lext:  lext,
        rext:  rext,
        input: input,
    }
}
func (t *Token) GetLineColumn() (line, col int) {
    line, col = 1, 1
    for j := 0; j < t.lext; j++ {
        switch t.input[j] {
        case '\n':
            line++
            col = 1
        case '\t':
            col += 4
        default:
            col++
        }
    }
    return
}
func (t *Token) GetInput() []rune {
    return t.input
}
func (t *Token) Lext() int {
    return t.lext
}
func (t *Token) Literal() []rune {
    return t.input[t.lext:t.rext]
}
func (t *Token) LiteralString() string {
    return string(t.Literal())
}
func (t *Token) LiteralStripEscape() []rune {
	lit := t.Literal()
	strip := make([]rune, 0, len(lit))
	for i := 0; i < len(lit); i++ {
		if lit[i] == '\\' {
			i++
			switch lit[i] {
			case 't':
				strip = append(strip, '\t')
			case 'r':
				strip = append(strip, '\r')
			case 'n':
				strip = append(strip, '\r')
			default:
				strip = append(strip, lit[i])
			}
		} else {
			strip = append(strip, lit[i])
		}
	}
	return strip
}
func (t *Token) LiteralStringStripEscape() string {
	return string(t.LiteralStripEscape())
}
func (t *Token) Rext() int {
    return t.rext
}
func (t *Token) String() string {
    return fmt.Sprintf("%s (%d,%d) %s",
        t.TypeID(), t.lext, t.rext, t.LiteralString())
}
func (t *Token) Suppress() bool {
	return Suppress[t.typ]
}
func (t *Token) Type() Type {
    return t.typ
}