feat: reducer, but doesn`t work
This commit is contained in:
@@ -5,13 +5,13 @@ type TokenType int
|
||||
const (
|
||||
TokenOpenParen TokenType = iota
|
||||
TokenCloseParen
|
||||
TokenAtom
|
||||
TokenVariable
|
||||
TokenSlash
|
||||
TokenDot
|
||||
)
|
||||
|
||||
type Token struct {
|
||||
Index int
|
||||
Type TokenType
|
||||
Type TokenType
|
||||
Value string
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ func getToken(i *iterator.Iterator[rune]) (*Token, error) {
|
||||
if err != nil || unicode.IsSpace(pop) || unicode.IsPunct(pop) {
|
||||
return &Token{
|
||||
Index: index,
|
||||
Type: TokenAtom,
|
||||
Type: TokenVariable,
|
||||
Value: atom,
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user