mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 05:50:30 +00:00
support par expression as checkpoint (#15802)
(cherry picked from commit 8115b655e7)
This commit is contained in:
@@ -641,7 +641,7 @@ macro check*(conditions: untyped): untyped =
|
||||
let paramAst = exp[i]
|
||||
if exp[i].kind == nnkIdent:
|
||||
result.printOuts.add getAst(print(argStr, paramAst))
|
||||
if exp[i].kind in nnkCallKinds + {nnkDotExpr, nnkBracketExpr}:
|
||||
if exp[i].kind in nnkCallKinds + {nnkDotExpr, nnkBracketExpr, nnkPar}:
|
||||
let callVar = newIdentNode(":c" & $counter)
|
||||
result.assigns.add getAst(asgn(callVar, paramAst))
|
||||
result.check[i] = callVar
|
||||
|
||||
Reference in New Issue
Block a user