feat: better recursive descent

This commit is contained in:
2025-12-27 01:18:06 -05:00
parent e3629acb45
commit a05a63627e
13 changed files with 316 additions and 221 deletions

View File

@@ -1,27 +0,0 @@
package saccharine
// All tokens in the pseudo-lambda language.
type TokenType int
const (
// Denotes the '(' token.
TokenOpenParen TokenType = iota
// Denotes the ')' token.
TokenCloseParen
// Denotes an alpha-numeric variable.
TokenVariable
// Denotes the '/' token.
TokenSlash
// Denotes the '.' token.
TokenDot
)
// A representation of a token in source code.
type Token struct {
// Where the token begins in the source text.
Index int
// What type the token is.
Type TokenType
// The value of the token.
Value string
}