blob: e88affbfc88bf4c8a257e653ae0e4d814dc19dc2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
puti ::= fn(x: int) {
#C("printf(\"%ld\\n\", (long)x);
");
};
putf ::= fn(x: float) {
#C("printf(\"%f\\n\", (double)x);
");
};
foo ::= fn() <int, int> {
x, y := 3, 5;
x, y
};
main ::= fn() {
a, b := foo();
x , y::= (int, int);
puti(a); puti(b);
c:x = 7;
d:x = 18;
k : [5]struct {x: int; y: int;};
puti(k[0].x);
};
|