fix: cannot parse just a token
This commit is contained in:
@@ -55,7 +55,11 @@ func getToken(i *iterator.Iterator[rune]) (*Token, error) {
|
|||||||
index := i.Index()
|
index := i.Index()
|
||||||
for {
|
for {
|
||||||
if i.IsDone() {
|
if i.IsDone() {
|
||||||
return nil, nil
|
return &Token{
|
||||||
|
Index: index,
|
||||||
|
Type: TokenVariable,
|
||||||
|
Value: atom,
|
||||||
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
pop, err := i.Peek()
|
pop, err := i.Peek()
|
||||||
|
|||||||
Reference in New Issue
Block a user