summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc17
1 files changed, 16 insertions, 1 deletions
diff --git a/test.toc b/test.toc
index 767ef38..32c2955 100644
--- a/test.toc
+++ b/test.toc
@@ -1,5 +1,20 @@
+io ::= nms {
+ #include "std/io.toc";
+};
-nms {
+n ::= nms {
x := 1;
+ counter ::= fn() int { x += 1; x };
};
+
+main ::= fn() {
+ a := n.counter();
+ b := n.counter();
+ n.counter();
+ c := n.counter();
+ io.puts("Hello!");
+ io.puti(a);
+ io.puti(b);
+ io.puti(c);
+};