annotate samples/recursive_closure.tp @ 181:f188723c15b4

Add call instruction to x86 module
author Mike Pavone <pavone@retrodev.com>
date Sat, 24 Aug 2013 16:21:42 -0700
parents 3a169ebb3224
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
55
93ddb4ad6fcb Fix some nested closure bugs
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
1 #{
93ddb4ad6fcb Fix some nested closure bugs
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
2 main <- {
93ddb4ad6fcb Fix some nested closure bugs
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
3 foo <- :n {
93ddb4ad6fcb Fix some nested closure bugs
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
4 if: n < 10 {
93ddb4ad6fcb Fix some nested closure bugs
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
5 true
93ddb4ad6fcb Fix some nested closure bugs
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
6 } else: {
93ddb4ad6fcb Fix some nested closure bugs
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
7 foo <- :n { n }
93ddb4ad6fcb Fix some nested closure bugs
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
8 }
93ddb4ad6fcb Fix some nested closure bugs
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
9 foo: n + 1
93ddb4ad6fcb Fix some nested closure bugs
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
10 }
93ddb4ad6fcb Fix some nested closure bugs
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
11 print: (string: (foo: 0))
93ddb4ad6fcb Fix some nested closure bugs
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
12 }
93ddb4ad6fcb Fix some nested closure bugs
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
13 }