Merge branch 'zahary' into araq2

This commit is contained in:
Andreas Rumpf 2017-05-17 15:27:04 +02:00
commit 61a0eba14f
25 changed files with 1017 additions and 84 deletions

View file

@ -1609,8 +1609,9 @@ proc setupMacroParam(x: PNode, typ: PType): TFullReg =
iterator genericParamsInMacroCall*(macroSym: PSym, call: PNode): (PSym, PNode) =
let gp = macroSym.ast[genericParamsPos]
for i in 0 .. <gp.len:
let idx = macroSym.typ.len + i
yield (gp[i].sym, call.sons[idx])
let genericParam = gp[i].sym
let posInCall = macroSym.typ.len + i
yield (genericParam, call[posInCall])
var evalMacroCounter: int