preparations for Nimble NimScript integrations; minor cleanups

This commit is contained in:
Araq 2015-08-18 14:01:40 +02:00
commit 9659540b18
7 changed files with 74 additions and 6 deletions

View file

@ -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