summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2012-03-19 12:13:42 +0200
committerZahary Karadjov <zahary@gmail.com>2012-03-19 12:14:32 +0200
commit7b41b0f84113d3b9901d5c598dd909a1df6f960f (patch)
tree80027b6dd94a0758bb6645222d23b80de3e6b719 /compiler
parente43f8d842bd91d92caecd24c190881d1dddeaf38 (diff)
downloadNim-7b41b0f84113d3b9901d5c598dd909a1df6f960f.tar.gz
missed file from the previous commit
Diffstat (limited to 'compiler')
-rwxr-xr-xcompiler/ast.nim7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim
index 37f95c230..a1b69bed8 100755
--- a/compiler/ast.nim
+++ b/compiler/ast.nim
@@ -794,6 +794,13 @@ proc newNodeI(kind: TNodeKind, info: TLineInfo): PNode =
   result = newNode(kind)
   result.info = info
 
+proc newNode*(kind: TNodeKind, info: TLineInfo, sons: TNodeSeq = @[],
+             typ: PType = nil): PNode =
+  result = newNode(kind)
+  result.info = info
+  result.typ = typ
+  result.sons = sons
+
 proc newNodeIT(kind: TNodeKind, info: TLineInfo, typ: PType): PNode = 
   result = newNode(kind)
   result.info = info