Finished Lexing

This commit is contained in:
Aidan 2019-11-28 00:42:47 -08:00
parent 8643824bb6
commit 4f9663acf0
No known key found for this signature in database
GPG key ID: 327711E983899316
2 changed files with 5 additions and 9 deletions

Binary file not shown.

View file

@ -6,11 +6,10 @@ import (
type token_t int type token_t int
const ( 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
} }
} }