breaking change: getAst strips away pointless nnkStmtList nodes; node rendering of nnkStmtList without wrong indentation

This commit is contained in:
Andreas Rumpf 2017-09-26 10:24:14 +02:00
commit 61720e0df9
3 changed files with 13 additions and 5 deletions

View file

@ -979,7 +979,8 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
let node = regs[rb+i].regToNode
node.info = c.debug[pc]
macroCall.add(node)
let a = evalTemplate(macroCall, prc, genSymOwner)
var a = evalTemplate(macroCall, prc, genSymOwner)
if a.kind == nkStmtList and a.len == 1: a = a[0]
a.recSetFlagIsRef
ensureKind(rkNode)
regs[ra].node = a