From 86242b6cc1f53a86fcce1312211d3232661bf454 Mon Sep 17 00:00:00 2001 From: lemon Date: Wed, 17 Aug 2022 13:10:45 +0200 Subject: collatz checks --- src/cffc.hff | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/cffc.hff') 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, body [#]Stmt, + id int, }, + Break #{loopid} int, + Continue #{loopid} int, Return Option, Expr Expr, Decl *Decl, -- cgit v1.2.3