aboutsummaryrefslogtreecommitdiff
path: root/src/cffc.hff
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-17 13:10:45 +0200
committerlemon <lsof@mailbox.org>2022-08-17 13:32:11 +0200
commit86242b6cc1f53a86fcce1312211d3232661bf454 (patch)
treea86552654922058fc53c1678878bb5c720bd25f6 /src/cffc.hff
parent37cd29c0299dc3a726c7f8273cf203a868133f57 (diff)
collatz checks
Diffstat (limited to 'src/cffc.hff')
-rw-r--r--src/cffc.hff7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cffc.hff b/src/cffc.hff
index 32683eb..2252373 100644
--- a/src/cffc.hff
+++ b/src/cffc.hff
@@ -109,6 +109,8 @@ struct Parser {
curfile *const u8,
curfn *Fn,
curenv *Env,
+ curloop int,
+ loopid int,
tokloc Loc,
curloc Loc,
eof bool,
@@ -157,13 +159,16 @@ struct Stmt {
u enum union {
Block [#]Stmt,
If struct { test Expr, t [#]Stmt, f [#]Stmt },
- While struct { test Expr, body [#]Stmt },
+ While struct { test Expr, body [#]Stmt, id int },
For struct {
ini [#]Stmt,
test Expr,
next Option<Expr>,
body [#]Stmt,
+ id int,
},
+ Break #{loopid} int,
+ Continue #{loopid} int,
Return Option<Expr>,
Expr Expr,
Decl *Decl,