diff options
Diffstat (limited to 'tests/macros/texprcolonexpr.nim')
-rw-r--r-- | tests/macros/texprcolonexpr.nim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/macros/texprcolonexpr.nim b/tests/macros/texprcolonexpr.nim new file mode 100644 index 000000000..3b2c86b77 --- /dev/null +++ b/tests/macros/texprcolonexpr.nim @@ -0,0 +1,19 @@ +discard """ + msg: ''' +Infix + Ident !"=>" + Call + Ident !"name" + Ident !"a" + ExprColonExpr + Ident !"b" + Ident !"cint" + NilLit nil +''' +""" +import macros + +macro def(x: stmt): stmt {.immediate.} = + echo treeRepr(x) + +def name(a, b:cint) => nil |