Fin/token.go

31 lines
473 B
Go

package fin
/*
token.go
Copyright 2025 Sharkk, sharkk.net
Authors: Sky Johnson
*/
// 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
}