summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc12
1 files changed, 11 insertions, 1 deletions
diff --git a/test.toc b/test.toc
index cc54d95..79e0d43 100644
--- a/test.toc
+++ b/test.toc
@@ -2,7 +2,17 @@ Foo ::= struct {
x: u8;
};
#export main ::= fn() Foo {
+ g ::= fn() int { 3 };
+
f: Foo;
- f.x = 13 as u8;
+ if f.x == 0 {
+ f.x = g() as u8;
+ } elif f.x == 1 {
+ f.x = 2;
+ } elif f.x == 3 {
+ f.x = 17;
+ } else {
+ f.x = 112;
+ }
f
}; \ No newline at end of file