aboutsummaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-08-29 13:45:13 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-08-29 13:45:13 -0400
commit5ab9adf6e57c516220a594f9e8b39e5214f1af2d (patch)
tree5edc5ea61fb92931b17594952818c305692679a9 /src/parse
parent190810fcb1144cd29a676e15dd8d1a414072862d (diff)
Fix repeat issue
Diffstat (limited to 'src/parse')
-rw-r--r--src/parse/controlflow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parse/controlflow.c b/src/parse/controlflow.c
index f50c84d7..2f07d925 100644
--- a/src/parse/controlflow.c
+++ b/src/parse/controlflow.c
@@ -137,7 +137,7 @@ ast_t *parse_while(parse_ctx_t *ctx, const char *pos) {
if (match_word(&tmp, "when")) {
ast_t *when = expect(ctx, start, &pos, parse_when, "I expected a 'when' block after this");
if (!when->__data.When.else_body) when->__data.When.else_body = NewAST(ctx->file, pos, pos, Stop);
- return NewAST(ctx->file, start, pos, While, .body = when);
+ return NewAST(ctx->file, start, pos, Repeat, .body = when);
}
(void)match_word(&pos, "do"); // Optional 'do'