summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc31
1 files changed, 7 insertions, 24 deletions
diff --git a/test.toc b/test.toc
index 75bdad5..ba3ef1b 100644
--- a/test.toc
+++ b/test.toc
@@ -1,28 +1,11 @@
-io ::= nms {
- #include "std/io.toc";
-};
-
-ll ::= struct {
- head : int;
- tail : ≪
-};
+// io ::= nms {
+ // #include "std/io.toc";
+// };
-slice_to_ll ::= fn(x: []int) l: ll {
- if x.len == 1 {
- l.head = x[0];
- l.tail = 0 as ≪
- return;
- }
- l.head = x[0];
- l.tail = new(ll);
- *l.tail = slice_to_ll(x[1:]);
+foo ::= struct(t::Type) {
+ x: t;
};
main ::= fn() {
- a : []int = new(int,3);
- a[0] = 1;
- a[1] = 2;
- a[2] = 3;
- l : ll = slice_to_ll(a);
- io.puti(l.tail.tail.head);
-};
+
+}; \ No newline at end of file