fixed a newly introduced c2nim bug; many untested improvements to the FFI at compile time

This commit is contained in:
Araq 2012-12-31 17:53:37 +01:00
commit 9ef367db62
6 changed files with 225 additions and 47 deletions

View file

@ -42,6 +42,7 @@ proc parseDefine(p: var TParser): PNode =
result = newNodeP(nkTemplateDef, p)
getTok(p)
addSon(result, skipIdentExport(p))
addSon(result, ast.emptyNode)
eat(p, pxParLe)
var params = newNodeP(nkFormalParams, p)
# return type; not known yet:
@ -60,6 +61,7 @@ proc parseDefine(p: var TParser): PNode =
addSon(result, ast.emptyNode) # no generic parameters
addSon(result, params)
addSon(result, ast.emptyNode) # no pragmas
addSon(result, ast.emptyNode)
var kind = parseDefineBody(p, result)
params.sons[0] = newIdentNodeP(kind, p)
eatNewLine(p, result)