add node and token namespaces
This commit is contained in:
15
token/token.go
Normal file
15
token/token.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package token
|
||||
|
||||
type Token struct {
|
||||
Value string
|
||||
StartLine int
|
||||
EndLine int
|
||||
}
|
||||
|
||||
func NewToken(value []byte, startLine int, endLine int) Token {
|
||||
return Token{string(value), startLine, endLine}
|
||||
}
|
||||
|
||||
func (t Token) String() string {
|
||||
return string(t.Value)
|
||||
}
|
||||
Reference in New Issue
Block a user