preliminary work on the loop parsing
This commit is contained in:
parent
39c92585f1
commit
eaebcd7bdd
4 changed files with 18 additions and 2 deletions
9
lexer.c
9
lexer.c
|
|
@ -262,8 +262,13 @@ static bool parse_special(lexer *l)
|
|||
l->index += 1;
|
||||
return true;
|
||||
case '.':
|
||||
add_token(l, TOKEN_DOT, 1);
|
||||
l->index += 1;
|
||||
if (l->source[l->index+1] == '.') {
|
||||
add_token(l, TOKEN_DOUBLE_DOT, 2);
|
||||
l->index += 2;
|
||||
} else {
|
||||
add_token(l, TOKEN_DOT, 1);
|
||||
l->index += 1;
|
||||
}
|
||||
return true;
|
||||
case ',':
|
||||
add_token(l, TOKEN_COMMA, 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue