summaryrefslogtreecommitdiff
path: root/test.toc
blob: a23df05acc0c0af58188585a5fe5717184b70f81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "std/io.toc";

Point ::= struct {
	x, y: int;
}

foo ::= fn() []char {
	return "y";
}

main ::= fn() {
	p: Point;
	p["x"] = 5;
	p[foo()] = 17;
	puti(p["x"]);
	puti(p.y);
}