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 --- docs/help.txt | 2 +- docs/stats.txt | 6 +++--- docs/version.txt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'docs') diff --git a/docs/help.txt b/docs/help.txt index 3921ea2..4ccd7a7 100644 --- a/docs/help.txt +++ b/docs/help.txt @@ -1,4 +1,4 @@ -Fype Superalpha Build 9669 +Fype Superalpha Build 9671 (c) Paul C. Buetow (2005 - 2008) -e Executes given code string (see synopses) -h Prints this help diff --git a/docs/stats.txt b/docs/stats.txt index 81214dc..583ddf1 100644 --- a/docs/stats.txt +++ b/docs/stats.txt @@ -1,6 +1,6 @@ make[1]: Entering directory '/home/paul/git/fype' ===> Num of C source files : 46 -===> Num of C source lines : 8225 -===> Num of Fype source examples : 14 -===> Num of Fype source lines : 362 +===> Num of C source lines : 8237 +===> Num of Fype source examples : 15 +===> Num of Fype source lines : 387 make[1]: Leaving directory '/home/paul/git/fype' diff --git a/docs/version.txt b/docs/version.txt index 1a4849f..ea87c13 100644 --- a/docs/version.txt +++ b/docs/version.txt @@ -1 +1 @@ -Fype Superalpha Build 9669 +Fype Superalpha Build 9671 -- cgit v1.2.3