summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc22
1 files changed, 4 insertions, 18 deletions
diff --git a/test.toc b/test.toc
index ec65787..0450b18 100644
--- a/test.toc
+++ b/test.toc
@@ -1,23 +1,9 @@
-#include "std/mem.toc", mem;
-#include "tests/std/io.toc", io;
-use mem;
-sum_slice ::= fn(a : &[]int) total := 0 {
- for i := 0..a.len-1 {
- total += a[i];
- }
-}
+#include "test.toc";
-thing ::= fn() int {
- bar : []int;
- defer dels(bar);
- bar = news(int, 3);
- b := sum_slice(&bar);
- b
+foo ::= fn() int {
+ 5
}
main ::= fn() {
- a := thing();
- b ::= thing();
- io.puti(a);
- io.puti(b);
+ foo();
}