summary refs log tree commit diff stats
path: root/tests/macros
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2014-04-20 21:54:59 +0100
committerDominik Picheta <dominikpicheta@googlemail.com>2014-04-20 21:55:45 +0100
commit57cc8237f72b26cb56f8f250e382f8a0e091aea1 (patch)
treeb11c108783ff84e78d8b594d33decea52713c8e9 /tests/macros
parent36fc1d9d72b91a632b795b656a5ead52b472036f (diff)
downloadNim-57cc8237f72b26cb56f8f250e382f8a0e091aea1.tar.gz
Fixes #1093.
Diffstat (limited to 'tests/macros')
-rw-r--r--tests/macros/texprcolonexpr.nim19
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