diff options
Diffstat (limited to 'compiler')
-rwxr-xr-x | compiler/ast.nim | 7 |
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 |