Remove expr/stmt (#5857)
This commit is contained in:
parent
52ff244d5d
commit
000b8afd26
168 changed files with 497 additions and 529 deletions
|
|
@ -12,7 +12,7 @@ import
|
|||
# Nim's destructors offer a mechanism for automatic
|
||||
# disposal of resources.
|
||||
#
|
||||
macro autoClose(e: expr): stmt {.immediate.} =
|
||||
macro autoClose(args: varargs[untyped]): untyped =
|
||||
let e = callsite()
|
||||
if e.len != 3:
|
||||
error "Using statement: unexpected number of arguments. Got " &
|
||||
|
|
@ -85,5 +85,3 @@ proc use(r: var TResource) =
|
|||
|
||||
autoClose(r = openResource("test")):
|
||||
use r
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue