first implementation of the 'func' keyword
This commit is contained in:
parent
2e93bac227
commit
1a61c4d46d
31 changed files with 97 additions and 84 deletions
|
|
@ -630,7 +630,7 @@ proc getConstExpr(m: PSym, n: PNode): PNode =
|
|||
result = newStrNodeT(lookupSymbol(s.name), n)
|
||||
else:
|
||||
result = copyTree(s.ast)
|
||||
of {skProc, skMethod}:
|
||||
of {skProc, skFunc, skMethod}:
|
||||
result = n
|
||||
of skType:
|
||||
# XXX gensym'ed symbols can come here and cannot be resolved. This is
|
||||
|
|
@ -654,7 +654,7 @@ proc getConstExpr(m: PSym, n: PNode): PNode =
|
|||
of nkCallKinds:
|
||||
if n.sons[0].kind != nkSym: return
|
||||
var s = n.sons[0].sym
|
||||
if s.kind != skProc: return
|
||||
if s.kind != skProc and s.kind != skFunc: return
|
||||
try:
|
||||
case s.magic
|
||||
of mNone:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue