diff options
Diffstat (limited to 'compiler/transf.nim')
-rwxr-xr-x | compiler/transf.nim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/transf.nim b/compiler/transf.nim index 509aa9320..70d0771bd 100755 --- a/compiler/transf.nim +++ b/compiler/transf.nim @@ -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: |