add node and token namespaces

This commit is contained in:
z7zmey
2017-12-03 20:49:18 +02:00
parent 71949dbcd2
commit 4da2844ea8
11 changed files with 1715 additions and 1684 deletions

15
token/token.go Normal file
View 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)
}