Finished Lexing
This commit is contained in:
parent
8643824bb6
commit
4f9663acf0
2 changed files with 5 additions and 9 deletions
Binary file not shown.
|
|
@ -9,8 +9,7 @@ const (
|
||||||
LIST token_t = iota
|
LIST token_t = iota
|
||||||
STRING token_t = iota
|
STRING token_t = iota
|
||||||
NUMBER token_t = iota
|
NUMBER token_t = iota
|
||||||
VARIABLE token_t = iota
|
SYMBOL token_t = iota
|
||||||
FUNCTION token_t = iota
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Token struct {
|
type Token struct {
|
||||||
|
|
@ -64,11 +63,8 @@ func Lex(input string) *Token {
|
||||||
} else if is_num {
|
} else if is_num {
|
||||||
*iter.tag = NUMBER
|
*iter.tag = NUMBER
|
||||||
|
|
||||||
} else if () {
|
|
||||||
// TODO: Detect VARIABLE
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
*iter.tag = FUNCTION
|
*iter.tag = SYMBOL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue