diff options
author | Araq <rumpf_a@web.de> | 2012-09-04 00:55:13 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-09-04 00:55:13 +0200 |
commit | 6753d3685448eb2ba5760de0bcc842a887d09a84 (patch) | |
tree | c4689853edb97b78dbff6edb337735a873e6bb97 /tests/patterns/tor.nim | |
parent | b4cd119800c96361ff74ab804002c32d303233fc (diff) | |
download | Nim-6753d3685448eb2ba5760de0bcc842a887d09a84.tar.gz |
further improvements for term rewriting macros
Diffstat (limited to 'tests/patterns/tor.nim')
-rw-r--r-- | tests/patterns/tor.nim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/patterns/tor.nim b/tests/patterns/tor.nim new file mode 100644 index 000000000..304e1c692 --- /dev/null +++ b/tests/patterns/tor.nim @@ -0,0 +1,9 @@ +discard """ + output: "110" +""" + +template arithOps: expr = (`+` | `-` | `*`) +template testOr{ (arithOps{f})(a, b) }(a, b, f: expr): expr = f(a+1, b) + +let xx = 10 +echo 10*xx |