diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-03-03 17:05:28 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-03-03 17:05:28 -0500 |
commit | 2bf840925ba7781d16406ac28438f8bdc5f7d08c (patch) | |
tree | e70ca149eafd8eb4366a6ecf1edb1d4bed9e5aee /tests/nms.toc | |
parent | 0a3bb0c9ce4a2e96c7be3d0519aa0f5fa458c1af (diff) |
new, better test system
Diffstat (limited to 'tests/nms.toc')
-rw-r--r-- | tests/nms.toc | 20 |
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); +}; |