Fin/token.go
2025-03-03 07:12:15 -06:00

26 lines
415 B
Go

package config
// TokenType represents the type of token
type TokenType int
const (
TokenError TokenType = iota
TokenEOF
TokenName
TokenString
TokenNumber
TokenBoolean
TokenEquals
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
}