1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
puti ::= fn(x: int) { #C("printf(\"%ld\\n\", (long)x); "); }; putf ::= fn(x: float) { #C("printf(\"%f\\n\", (double)x); "); }; point ::= pkg "point"; main ::= fn() { x : point.Point = point.mk_point(13, 14); puti(x.x + x.y); };