From 147153bf6aadd52d32f6beffc17f610c837ce17f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 19 Feb 2026 00:33:17 +0200 Subject: Implement break and next for while/until loops TT_BREAK and TT_NEXT were already tokenised; this wires them up: - _program(): guard statement loop with ct == CONTROL_NONE so a break/next flag set inside a loop body stops block execution and propagates upward - _control(): add TT_BREAK and TT_NEXT cases that set CONTROL_BREAK / CONTROL_NEXT on p_interpret->ct and return immediately - while/until loop: replace the commented-out switch with active if/else logic that clears the flag and either stops iteration (break) or lets the loop re-evaluate its condition (next) Add examples/break_next.fy to exercise both keywords in while and until loops; expected output: 5 / 12 / 7. Co-Authored-By: Claude Sonnet 4.6 --- src/build.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/build.h') diff --git a/src/build.h b/src/build.h index 794ac65..c3808f5 100644 --- a/src/build.h +++ b/src/build.h @@ -36,7 +36,7 @@ #ifndef BUILD_H #define BUILD_H -#define BUILDNR 9670 +#define BUILDNR 9672 #define OS_LINUX #endif -- cgit v1.2.3