Fin/token.go
2025-04-18 12:12:49 -05:00

25 lines
399 B
Go

package fin
// 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
}