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