somewhat working closures
This commit is contained in:
parent
98458a3076
commit
f191059e56
8 changed files with 95 additions and 33 deletions
|
|
@ -501,7 +501,8 @@ proc evalSym(c: PEvalContext, n: PNode, flags: TEvalFlags): PNode =
|
|||
result = evalGlobalVar(c, s, flags)
|
||||
of skParam:
|
||||
# XXX what about LValue?
|
||||
result = c.tos.params[s.position + 1]
|
||||
if s.position + 1 <% c.tos.params.len:
|
||||
result = c.tos.params[s.position + 1]
|
||||
of skConst: result = s.ast
|
||||
of skEnumField: result = newIntNodeT(s.position, n)
|
||||
else: result = nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue