clean up SOME pending/xxx/issue link comments (#21826)

* clean up SOME pending/xxx/issue link comments

* great
This commit is contained in:
metagn
2023-05-11 11:23:52 +03:00
committed by GitHub
parent 3a08e2e6ac
commit 02be212dae
35 changed files with 110 additions and 177 deletions

View File

@@ -49,25 +49,13 @@ macro autoClose(args: varargs[untyped]): untyped =
var finallyBlock = newNimNode(nnkStmtList)
finallyBlock.add(closingCalls)
# XXX: Use a template here once getAst is working properly
var targetAst = parseStmt"""block:
var
x = foo()
y = bar()
try:
body()
finally:
close x
close y
"""
targetAst[0][1][0] = varSection
targetAst[0][1][1][0] = body
targetAst[0][1][1][1][0] = finallyBlock
result = targetAst
result = quote do:
block:
`varSection`
try:
`body`
finally:
`finallyBlock`
type
TResource* = object