summaryrefslogtreecommitdiff
path: root/tests/nms.toc
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-03-03 17:05:28 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-03-03 17:05:28 -0500
commit2bf840925ba7781d16406ac28438f8bdc5f7d08c (patch)
treee70ca149eafd8eb4366a6ecf1edb1d4bed9e5aee /tests/nms.toc
parent0a3bb0c9ce4a2e96c7be3d0519aa0f5fa458c1af (diff)
new, better test system
Diffstat (limited to 'tests/nms.toc')
-rw-r--r--tests/nms.toc20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/nms.toc b/tests/nms.toc
new file mode 100644
index 0000000..413da8d
--- /dev/null
+++ b/tests/nms.toc
@@ -0,0 +1,20 @@
+io ::= nms {
+ #include "io.toc";
+};
+
+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);
+};