further steps for closure support; added 'system.rawProc', 'system.rawEnv'
This commit is contained in:
parent
2c4a1dbc0c
commit
f3f3fc01aa
4 changed files with 68 additions and 13 deletions
|
|
@ -626,6 +626,13 @@ proc transform(c: PTransf, n: PNode): PTransNode =
|
|||
if n.sons[namePos].kind == nkSym:
|
||||
let x = transformSym(c, n.sons[namePos])
|
||||
if x.pnode.kind == nkClosure: result = x
|
||||
of nkMacroDef:
|
||||
# XXX no proper closure support yet:
|
||||
if n.sons[genericParamsPos].kind == nkEmpty:
|
||||
var s = n.sons[namePos].sym
|
||||
n.sons[bodyPos] = PNode(transform(c, s.getBody))
|
||||
if n.kind == nkMethodDef: methodDef(s, false)
|
||||
result = PTransNode(n)
|
||||
of nkForStmt: result = transformFor(c, n)
|
||||
of nkCaseStmt: result = transformCase(c, n)
|
||||
of nkContinueStmt:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue