preparations for Nimble NimScript integrations; minor cleanups
This commit is contained in:
parent
10a7830ba2
commit
9659540b18
7 changed files with 74 additions and 6 deletions
|
|
@ -1401,6 +1401,10 @@ proc evalExpr*(c: PCtx, n: PNode): PNode =
|
|||
assert c.code[start].opcode != opcEof
|
||||
result = execute(c, start)
|
||||
|
||||
proc getGlobalValue*(c: PCtx; s: PSym): PNode =
|
||||
internalAssert s.kind in {skLet, skVar} and sfGlobal in s.flags
|
||||
result = c.globals.sons[s.position-1]
|
||||
|
||||
include vmops
|
||||
|
||||
# for now we share the 'globals' environment. XXX Coming soon: An API for
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue