added system.locals
This commit is contained in:
parent
02b1503e1f
commit
c9ed846a43
7 changed files with 64 additions and 18 deletions
|
|
@ -2548,3 +2548,10 @@ proc safeAdd*(x: var string, y: string) =
|
|||
if x == nil: x = y
|
||||
else: x.add(y)
|
||||
|
||||
proc locals*(): TObject {.magic: "Locals", noSideEffect.} =
|
||||
## generates a tuple constructor expression listing all the local variables
|
||||
## in the current scope. This is quite fast as it does not rely
|
||||
## on any debug or runtime information. Note that in constrast to what
|
||||
## the official signature says, the return type is not ``TObject`` but a
|
||||
## tuple of a structure that depends on the current scope.
|
||||
nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue