summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc17
1 files changed, 13 insertions, 4 deletions
diff --git a/test.toc b/test.toc
index bffe02a..4811e46 100644
--- a/test.toc
+++ b/test.toc
@@ -1,10 +1,19 @@
+
// it would be nice if Arr.data.len == Arr.len (: but this will require some C code...
Arr ::= fn (t :: Type) Type {
- struct {
- data : t;
- }
+ // struct {
+ // data : []t;
+ // len, cap : int;
+ // }
+ t
+};
+
+arr_add ::= fn(t :: Type, a : &Arr(t), x : t) {
};
main ::= fn() {
arr : Arr(int);
-};
+ for i := 1..100 {
+ arr_add(int, &arr, 3);
+ }
+}; \ No newline at end of file