better code generation for constant aggregates

This commit is contained in:
Araq 2011-11-02 00:55:29 +01:00
commit 351e89e705
10 changed files with 79 additions and 32 deletions

View file

@ -474,7 +474,8 @@ proc lowestExprAux(p: var TParser, limit: int): PNode =
var a = newNodeP(nkInfix, p)
var opNode = newIdentNodeP(p.tok.ident, p) # skip operator:
getTok(p)
optInd(p, opNode) # read sub-expression with higher priority
optInd(p, opNode)
# read sub-expression with higher priority:
var b = lowestExprAux(p, opPrec + leftAssoc)
addSon(a, opNode)
addSon(a, result)