summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc17
1 files changed, 11 insertions, 6 deletions
diff --git a/test.toc b/test.toc
index fa54fc3..26b449d 100644
--- a/test.toc
+++ b/test.toc
@@ -4,14 +4,19 @@ puti @= fn(x: int) {
};
Point @= struct {
- x, y : int;
- something:fn(f32);
- z,asdfasdfasdf:(int,int);
-
+ x_coordinate, y_coordinate : int;
};
main @= fn() {
p:Point;
-a:p;
- // asasdfdsfa:(int,int);
+ x := p.({
+ t @= int;
+ f @= fn() t { 7 as t };
+ if f() as int > 3 {
+ "x_coordinate"
+ } else {
+ "y_coordinate"
+ }
+ });
+ puti(x);
};