summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc12
1 files changed, 8 insertions, 4 deletions
diff --git a/test.toc b/test.toc
index f7db673..1e3969c 100644
--- a/test.toc
+++ b/test.toc
@@ -1,9 +1,14 @@
Foo ::= struct {
x: int;
};
-#export main ::= fn() Foo {
+
+foo ::= fn() int {
+ 3
+};
+
+#export main ::= fn() {
g ::= fn() int { 3 };
- a : [3]int;
+ a := new (int, 3);
b := a[1:3];
b[0] = 7;
f: Foo;
@@ -13,6 +18,5 @@ Foo ::= struct {
each k := 10..100 {
f.x += k;
}
-
- f
+ del(a);
}; \ No newline at end of file