github.com/sixexorg/magnetic-ring@v0.0.0-20191119090307-31705a21e419/vm/cvm/ast/token.go (about) 1 package ast 2 3 import ( 4 "fmt" 5 ) 6 7 type Position struct { 8 Source string 9 Line int 10 Column int 11 } 12 13 type Token struct { 14 Type int 15 Name string 16 Str string 17 Pos Position 18 } 19 20 func (token *Token) String() string { 21 return fmt.Sprintf("<type:%v, str:%v>", token.Name, token.Str) 22 }