summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc21
1 files changed, 17 insertions, 4 deletions
diff --git a/test.toc b/test.toc
index 644f701..010f7d5 100644
--- a/test.toc
+++ b/test.toc
@@ -1,9 +1,22 @@
#include "std/io.toc";
+Point ::= struct {
+ x, y : int;
+}
+
+Point3D ::= struct {
+ use p : Point;
+ z : int;
+}
+
main ::= fn() {
- x:[]int;
- p:=&x;
- p.len = 12;
- puti(p.len);
+ use s: Point3D;
+ x = 12;
+ z = 18;
+ y = -1238;
+ puti(x);
+ puti(y);
+ puti(z);
+ puti(p.x);
}
main();