summary refs log tree commit diff stats
path: root/compiler/ast.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/ast.nim')
-rwxr-xr-xcompiler/ast.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim
index de22cbd7d..7f28d7b89 100755
--- a/compiler/ast.nim
+++ b/compiler/ast.nim
@@ -633,6 +633,12 @@ proc copyNode*(src: PNode): PNode
 proc copyTree*(src: PNode): PNode
   # does copy its sons!
 
+const nkCallKinds* = {nkCall, nkInfix, nkPrefix, nkPostfix, nkCommand,
+                      nkCallStrLit}
+
+proc isCallExpr*(n: PNode): bool =
+  result = n.kind in nkCallKinds
+
 proc discardSons*(father: PNode)
 
 proc len*(n: PNode): int {.inline.} =