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.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim
index 351ceeb36..01b70980d 100755
--- a/compiler/ast.nim
+++ b/compiler/ast.nim
@@ -888,6 +888,10 @@ proc addSon(father, son: PNode) =
   if isNil(father.sons): father.sons = @[]
   add(father.sons, son)
 
+proc addSonNilAllowed*(father, son: PNode) =
+  if isNil(father.sons): father.sons = @[]
+  add(father.sons, son)
+
 proc delSon(father: PNode, idx: int) = 
   if isNil(father.sons): return 
   var length = sonsLen(father)