25 lines
399 B
Go
25 lines
399 B
Go
package scf
|
|
|
|
// TokenType represents the type of token
|
|
type TokenType int
|
|
|
|
const (
|
|
TokenError TokenType = iota
|
|
TokenEOF
|
|
TokenName
|
|
TokenString
|
|
TokenNumber
|
|
TokenBoolean
|
|
TokenOpenBrace
|
|
TokenCloseBrace
|
|
TokenComment
|
|
)
|
|
|
|
// Token represents a lexical token
|
|
type Token struct {
|
|
Type TokenType
|
|
Value []byte // Not modified after returning - caller must copy if needed
|
|
Line int
|
|
Column int
|
|
}
|