summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-05-08 16:17:37 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2020-05-08 16:17:37 -0400
commit1fac85b953b4a522e6b03fafa97c25a61e1c62ea (patch)
tree4ef588205feedac82b16dc05e7a72f058c087ebe /test.toc
parent5dabbe87ed4e86fa0306fd9ef11e7a7fee2a6ddb (diff)
allow use of global constant before declaring it, get rid of weird Location comparison
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc13
1 files changed, 13 insertions, 0 deletions
diff --git a/test.toc b/test.toc
index 4a91877..0f4d5a4 100644
--- a/test.toc
+++ b/test.toc
@@ -1 +1,14 @@
#include "std/io.toc", io;
+
+foo ::= fn() {
+ x := bar(12);
+ io.puti(x);
+}
+
+bar ::= fn(x: int) int {
+ y := x;
+ io.puti(y);
+ y
+}
+
+foo();