aboutsummaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
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'