diff --git a/compiler/ast.nim b/compiler/ast.nim index e073ce3e1b..8054e9248c 100644 --- a/compiler/ast.nim +++ b/compiler/ast.nim @@ -1013,6 +1013,10 @@ proc newNode*(kind: TNodeKind): PNode = writeStackTrace() inc gNodeId +proc newTree*(kind: TNodeKind; children: varargs[PNode]): PNode = + result = newNode(kind) + result.sons = @children + proc newIntNode*(kind: TNodeKind, intVal: BiggestInt): PNode = result = newNode(kind) result.intVal = intVal