Expand hoisted default params in sem (#15270)
* Expand hoisted default params in sem
Introduce ast.newTree{I,IT}
Add test for default params in procs
* Cleanup
* Simplify hoist transformation and expand test
This commit is contained in:
parent
70d6238756
commit
35ff17410f
12 changed files with 178 additions and 123 deletions
|
|
@ -1444,7 +1444,7 @@ proc parseExprStmt(p: var Parser): PNode =
|
|||
result.add(commandParam(p, isFirstParam, pmNormal))
|
||||
if p.tok.tokType != tkComma: break
|
||||
elif p.tok.indent < 0 and isExprStart(p):
|
||||
result = newNode(nkCommand, a.info, @[a])
|
||||
result = newTreeI(nkCommand, a.info, a)
|
||||
while true:
|
||||
result.add(commandParam(p, isFirstParam, pmNormal))
|
||||
if p.tok.tokType != tkComma: break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue