diff options
| author | Mel <mel@rnrd.eu> | 2025-06-14 01:08:51 +0200 |
|---|---|---|
| committer | Mel <mel@rnrd.eu> | 2025-06-14 01:08:51 +0200 |
| commit | 4eba2d39dc40775bbd18020593e46d1a367db357 (patch) | |
| tree | 300afc647d56436d461c1242fd29f24afb626ecb /boot/lex.c | |
| parent | 5f4f2c7c87053eeda22a32b0f944f39f27c1e522 (diff) | |
| download | catskill-4eba2d39dc40775bbd18020593e46d1a367db357.tar.zst catskill-4eba2d39dc40775bbd18020593e46d1a367db357.zip | |
Bare-declaration parsing and `for` and `while` for loops
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'boot/lex.c')
| -rw-r--r-- | boot/lex.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/boot/lex.c b/boot/lex.c index f09e5e3..84657fa 100644 --- a/boot/lex.c +++ b/boot/lex.c @@ -90,7 +90,7 @@ enum Token_Kind TOKEN_WORD_IF, TOKEN_WORD_ELSE, TOKEN_WORD_FOR, - TOKEN_WORD_LOOP, + TOKEN_WORD_WHILE, TOKEN_WORD_BREAK, TOKEN_WORD_CONTINUE, TOKEN_WORD_DEFER, @@ -187,8 +187,8 @@ token_kind_to_string(enum Token_Kind kind) return "WORD_ELSE"; case TOKEN_WORD_FOR: return "WORD_FOR"; - case TOKEN_WORD_LOOP: - return "WORD_LOOP"; + case TOKEN_WORD_WHILE: + return "WORD_WHILE"; case TOKEN_WORD_BREAK: return "WORD_BREAK"; case TOKEN_WORD_CONTINUE: @@ -788,8 +788,8 @@ lexer_word_from_name(struct Lexer* l, struct String word_or_name) return TOKEN_WORD_ELSE; case 2652874405: // "for" return TOKEN_WORD_FOR; - case 1637870694: // "loop" - return TOKEN_WORD_LOOP; + case 1327426133: // "loop" + return TOKEN_WORD_WHILE; case 1007193266: // "break" return TOKEN_WORD_BREAK; case 1827824793: // "continue" |
