summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc22
1 files changed, 14 insertions, 8 deletions
diff --git a/test.toc b/test.toc
index f6bac2f..b143ad4 100644
--- a/test.toc
+++ b/test.toc
@@ -1,11 +1,17 @@
-f ::= g();
-
-x ::= 3;
-
-g ::= fn() int { x };
+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() {
- #C("printf(\"%ld\\n\", (long)x)");
- a := g();
- #C("printf(\"%ld\\n\", (long)a)");
+ a, b := foo();
+ puti(a); puti(b);
}; \ No newline at end of file