summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc18
1 files changed, 6 insertions, 12 deletions
diff --git a/test.toc b/test.toc
index 786bd03..7a3bf46 100644
--- a/test.toc
+++ b/test.toc
@@ -1,15 +1,9 @@
-Point ::= struct {
- x, y : int;
+io ::= pkg "std/io";
+hw ::= fn() int {
+ io.puts("Hello, world!");
+ 3
};
-
-p :: fn(Point) int = #foreign "p", "./test.so";
-
-mkpoint ::= fn(x:int,y:int) p : Point {
- p.x = x;
- p.y = y;
-};
-
main ::= fn() {
- point ::= mkpoint(-3,-5);
- total ::= p(point);
+x::=hw();
+hw();
}; \ No newline at end of file