diff options
Diffstat (limited to 'compiler/lowerings.nim')
-rw-r--r-- | compiler/lowerings.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/lowerings.nim b/compiler/lowerings.nim index 0b4f97ead..b6b01d558 100644 --- a/compiler/lowerings.nim +++ b/compiler/lowerings.nim @@ -15,6 +15,10 @@ const import ast, astalgo, types, idents, magicsys, msgs, options from trees import getMagic +proc newDeref*(n: PNode): PNode {.inline.} = + result = newNodeIT(nkHiddenDeref, n.info, n.typ.sons[0]) + addSon(result, n) + proc newTupleAccess*(tup: PNode, i: int): PNode = result = newNodeIT(nkBracketExpr, tup.info, tup.typ.skipTypes( abstractInst).sons[i]) |