summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc20
1 files changed, 13 insertions, 7 deletions
diff --git a/test.toc b/test.toc
index 206d903..7c662e0 100644
--- a/test.toc
+++ b/test.toc
@@ -1,10 +1,16 @@
+n ::= nms {
+ x := 1;
+ counter ::= fn() int { x += 1; x };
+};
+
main ::= fn() {
- x ::= nms {
- f ::= fn() {
-
- };
- };
- // x.g();
-}; \ No newline at end of file
+ a := counter();
+ b := counter();
+ counter();
+ c := counter();
+ puti(a);
+ puti(b);
+ puti(c);
+};