Reorganized file structure
This commit is contained in:
parent
8b595ef3ce
commit
722d07c321
57 changed files with 431 additions and 614 deletions
|
@ -1,15 +0,0 @@
|
|||
package token
|
||||
|
||||
// Token represents a single element in a source file.
|
||||
// The characters that make up an identifier are grouped into a single token.
|
||||
// This makes parsing easier and allows us to do better syntax checks.
|
||||
type Token struct {
|
||||
Kind Kind
|
||||
Position int
|
||||
Bytes []byte
|
||||
}
|
||||
|
||||
// Text returns the token text.
|
||||
func (t Token) Text() string {
|
||||
return string(t.Bytes)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue