summaryrefslogtreecommitdiff
path: root/tests/nms.toc
blob: 32c295532718bf231e7f44f86b089273d387f2b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
io ::= nms {
	#include "std/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);
};