summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-03-22 16:34:39 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2020-03-22 16:34:39 -0400
commit8e5951cefcffcd74674233637c07137c6f60ecc1 (patch)
treee0b05f7992f4f8dba57fc89b0611f4665aa440f8 /test.toc
parent9fcf1a0190a6cc9e379448d14b628fd3b93a4d32 (diff)
more use
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc5
1 files changed, 5 insertions, 0 deletions
diff --git a/test.toc b/test.toc
index 8e611c0..2b44207 100644
--- a/test.toc
+++ b/test.toc
@@ -2,6 +2,11 @@ Point ::= struct {
x, y: int;
}
+mkpoint ::= fn(x, y: int) p: Point {
+ p.x = x;
+ p.y = y;
+}
+
main ::= fn() {
p: Point;
use p;