summaryrefslogtreecommitdiff
path: root/test.toc
blob: 8181d0dd81d8192ba26754cf8be9542ca25e1144 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
puti @= fn(x: int) {
	 #C("printf(\"%ld\\n\", (long)x);
");
};

☃ @= struct {
	x, y: int;
	z: float;
};
something @= fn() int {
		  5
};

bar @= fn(a := something()) f: ☃, g: int {
	f.x = a;
	f.y = 123;
	f.z += 43.2;
	g = 17;
};

main @= fn() {
f,g := bar();
puti(g);
puti(f.x);
puti(f.y);
h,i := bar();
puti(h.x);
};