diff options
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 |