summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-19 00:42:29 +0200
committerPaul Buetow <paul@buetow.org>2026-02-19 00:42:29 +0200
commite1b9116c18cc3f5dae14aa99263650eca2e6a9ed (patch)
tree574cdc73bfc7bc575a7e9a8b1315ced6dcb232c8 /docs
parent147153bf6aadd52d32f6beffc17f610c837ce17f (diff)
Implement loop (infinite) and do...while/until loops
Completes the 'loop, next, break, do' TODO entry — break and next were landed in the previous commit; this adds the remaining two forms: - loop { body } — infinite loop; the only exit is break. Simpler than while/until since there is no condition expression to evaluate. - do { body } while expr; / do { body } until expr; — post-condition loop: body always executes at least once, condition is checked at the bottom of each iteration. Condition tokens are collected until ';' (mirrors _expression_get but stops at semicolon instead of '{'), then replayed each iteration using the same temp-stack/temp-iterator technique as while/until. Both break and next are supported. Token changes: TT_LOOP and TT_DO added to the keyword enum in token.h, registered in get_tt() and tt_get_name() in token.c. Add examples/loop_do.fy; expected output: 5 / 12 / 11 / 5. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/help.txt2
-rw-r--r--docs/stats.txt6
-rw-r--r--docs/version.txt2
3 files changed, 5 insertions, 5 deletions
diff --git a/docs/help.txt b/docs/help.txt
index 4ccd7a7..37ccbb1 100644
--- a/docs/help.txt
+++ b/docs/help.txt
@@ -1,4 +1,4 @@
-Fype Superalpha Build 9671
+Fype Superalpha Build 9673
(c) Paul C. Buetow (2005 - 2008) <fype@dev.buetow.org>
-e Executes given code string (see synopses)
-h Prints this help
diff --git a/docs/stats.txt b/docs/stats.txt
index 583ddf1..d0571bc 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 : 8237
-===> Num of Fype source examples : 15
-===> Num of Fype source lines : 387
+===> Num of C source lines : 8344
+===> Num of Fype source examples : 16
+===> Num of Fype source lines : 419
make[1]: Leaving directory '/home/paul/git/fype'
diff --git a/docs/version.txt b/docs/version.txt
index ea87c13..c825cd1 100644
--- a/docs/version.txt
+++ b/docs/version.txt
@@ -1 +1 @@
-Fype Superalpha Build 9671
+Fype Superalpha Build 9673