about summary refs log tree commit diff
path: root/boot
diff options
context:
space:
mode:
authorMel <mel@rnrd.eu>2025-05-31 23:42:02 +0200
committerMel <mel@rnrd.eu>2025-05-31 23:53:39 +0200
commit43b8623ad8323ac73f40908f0fae9f57aa906f39 (patch)
treef7155be91e7331fc955de6ff2ee9c585fad2a227 /boot
parenta422f9aead499a526179ba2df2aff1aa44fe48d6 (diff)
downloadcatskill-43b8623ad8323ac73f40908f0fae9f57aa906f39.tar.zst
catskill-43b8623ad8323ac73f40908f0fae9f57aa906f39.zip
Skip all statement ending tokens in one `parse_statement` iteration
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'boot')
-rw-r--r--boot/parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/boot/parse.c b/boot/parse.c
index 4fc6107..5d3b26c 100644
--- a/boot/parse.c
+++ b/boot/parse.c
@@ -499,9 +499,9 @@ parser_statement(struct Parser* p, struct Parser_Error* error)
     struct Token token = parser_peek(p);
 
     // skip empty statements.
-    if (token_ends_statement(&token)) {
+    while (token_ends_statement(&token)) {
         parser_next(p);
-        return nil;
+        token = parser_peek(p);
     }
 
     if (token.kind == TOKEN_NAME) {