summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc11
1 files changed, 7 insertions, 4 deletions
diff --git a/test.toc b/test.toc
index db2f0b2..03ffe28 100644
--- a/test.toc
+++ b/test.toc
@@ -1,3 +1,4 @@
+
printf ::= #foreign("printf","libc.so.6") fn(#C &"const char", #C ..) #C int;
@@ -19,7 +20,7 @@ tprintf_valid ::= fn(fmt :: []char, nargs: int) bool {
}
}
count == nargs
-};
+}
tprintf ::= fn(fmt :: []char, args: ..) {
@@ -28,8 +29,10 @@ tprintf ::= fn(fmt :: []char, args: ..) {
}
f := fmt;
printf(&f[0], args);
-};
+}
main ::= fn() {
- tprintf("%d %d%%\n", 3, 4);
-};
+ tprintf("%d %d%%\n\0", 3, 4);
+}
+
+main(); \ No newline at end of file