c2nim: rewritten symbol exporting code
This commit is contained in:
parent
e6bc065cc5
commit
704663738a
4 changed files with 44 additions and 90 deletions
|
|
@ -40,7 +40,7 @@ proc parseDefine(p: var TParser): PNode =
|
|||
# a macro with parameters:
|
||||
result = newNodeP(nkTemplateDef, p)
|
||||
getTok(p)
|
||||
addSon(result, skipIdent(p))
|
||||
addSon(result, skipIdentExport(p))
|
||||
eat(p, pxParLe)
|
||||
var params = newNodeP(nkFormalParams, p)
|
||||
# return type; not known yet:
|
||||
|
|
@ -68,7 +68,7 @@ proc parseDefine(p: var TParser): PNode =
|
|||
while p.tok.xkind == pxDirective and p.tok.s == "define":
|
||||
getTok(p) # skip #define
|
||||
var c = newNodeP(nkConstDef, p)
|
||||
addSon(c, skipIdent(p))
|
||||
addSon(c, skipIdentExport(p))
|
||||
addSon(c, nil)
|
||||
skipStarCom(p, c)
|
||||
if p.tok.xkind in {pxLineComment, pxNewLine, pxEof}:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue