preliminary work on sea of nodes based intermediate representation.
This commit is contained in:
parent
989a32fa7b
commit
849e0b6863
13 changed files with 918 additions and 58 deletions
6
lexer.c
6
lexer.c
|
|
@ -133,9 +133,6 @@ static bool parse_special(lexer *l)
|
|||
} else if (l->source[l->index+1] == '-') {
|
||||
add_token(l, TOKEN_MINUS_MINUS, 2);
|
||||
l->index += 2;
|
||||
} else if (l->source[l->index+1] == '>') {
|
||||
add_token(l, TOKEN_ARROW, 2);
|
||||
l->index += 2;
|
||||
} else {
|
||||
add_token(l, TOKEN_MINUS, 1);
|
||||
l->index += 1;
|
||||
|
|
@ -231,6 +228,9 @@ static bool parse_special(lexer *l)
|
|||
if (l->source[l->index+1] == '=') {
|
||||
add_token(l, TOKEN_LESS_EQ, 2);
|
||||
l->index += 2;
|
||||
} else if (l->source[l->index+1] == '-') {
|
||||
add_token(l, TOKEN_ARROW, 2);
|
||||
l->index += 2;
|
||||
} else if (l->source[l->index+1] == '<') {
|
||||
if (l->source[l->index+2] == '=') {
|
||||
add_token(l, TOKEN_LSHIFT_EQ, 3);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue