Show lineinfo of for in yield (#9779)
This commit is contained in:
parent
a3c4791e9c
commit
467f53512f
1 changed files with 5 additions and 0 deletions
|
|
@ -368,6 +368,11 @@ proc transformYield(c: PTransf, n: PNode): PTransNode =
|
|||
else:
|
||||
# we need to introduce new local variables:
|
||||
add(result, introduceNewLocalVars(c, c.transCon.forLoopBody.PNode))
|
||||
if result.len > 0:
|
||||
var changeNode = PNode(result[0])
|
||||
changeNode.info = c.transCon.forStmt.info
|
||||
for i, child in changeNode:
|
||||
child.info = changeNode.info
|
||||
|
||||
proc transformAddrDeref(c: PTransf, n: PNode, a, b: TNodeKind): PTransNode =
|
||||
result = transformSons(c, n)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue