aboutsummaryrefslogtreecommitdiff
path: root/src/cffc.hff
diff options
context:
space:
mode:
Diffstat (limited to 'src/cffc.hff')
-rw-r--r--src/cffc.hff13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cffc.hff b/src/cffc.hff
index bc49f29..6147377 100644
--- a/src/cffc.hff
+++ b/src/cffc.hff
@@ -82,10 +82,12 @@ struct Type {
}
}
+struct Fn;
struct Parser {
fp *FILE,
alloc *Allocator,
curfile *const u8,
+ curfn *Fn,
curenv *Env,
tokloc Loc,
curloc Loc,
@@ -128,10 +130,21 @@ struct Expr {
}
}
+
+struct Stmt;
struct Stmt {
loc Loc,
u enum union {
Block [#]Stmt,
+ If struct { test Expr, t [#]Stmt, f [#]Stmt },
+ While struct { test Expr, body [#]Stmt },
+ For struct {
+ ini [#]Stmt,
+ test Expr,
+ next Option<Expr>,
+ body [#]Stmt,
+ },
+ Return Option<Expr>,
Expr Expr,
Decl *Decl,
}