summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc34
1 files changed, 28 insertions, 6 deletions
diff --git a/test.toc b/test.toc
index 80e1326..8e52b1b 100644
--- a/test.toc
+++ b/test.toc
@@ -10,13 +10,35 @@ puti @= fn(x: int) {
// };
+// Foo @= struct {
+// x, y: int;
+// z: float;
+// };
+
+
+// bar @= fn() (f: Foo) {
+// f.x = 3;
+// f.y = 123;
+// f.z += 43.2;
+// };
+
+f @= fn(x @ int) i: int {
+ i = x;
+};
main @= fn() {
-f @= fn(x: int, y @ int) int { x + y };
- puti(f(3,5));
-
- puti(f(4, 5));
- puti(f(3, 6));
-puti((fn(x: int, y @ int) int { x + y })(1,2));
+ puti(f(313));
+ puti(f(128));
+ puti(f(231));
+ puti(f(100+213));
};
+// b := bar();
+
+// f @= fn(x: int, y @ int) int { x + y };
+// puti(f(3,5));
+
+// puti(f(4, 5));
+// puti(f(3, 6));
+// puti((fn(x: int, y @ int) int { x + y })(1,2));
+// };