summaryrefslogtreecommitdiff
path: root/test.toc
blob: 44917acdd3f8c44cbd998149329d3f1fa0793d5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
stdc ::= "msvcrt.dll";
printf ::= #foreign("printf",stdc) fn (#C &"char const", #C ..) #C int;
puti ::= fn(i: i32) i32 {
	fmt := "number: %d\n\0";
	printf(&fmt[0], i) as i32
}
// BUG: puti(puti(x))
sqrtf ::= #foreign("sqrt",stdc) fn(f64) f64;

main ::= fn() {
	f ::= sqrtf(2.0);
}
main();