feat: better recursive descent
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user