From 5ab9adf6e57c516220a594f9e8b39e5214f1af2d Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 29 Aug 2025 13:45:13 -0400 Subject: Fix repeat issue --- src/parse/controlflow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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' -- cgit v1.2.3