parameter passing works the same for macros and templates; use callsite magic to access the invokation AST
This commit is contained in:
parent
6bcdb9c8f4
commit
b4844a189d
16 changed files with 270 additions and 180 deletions
|
|
@ -51,7 +51,7 @@ proc semGenericStmtSymbol(c: PContext, n: PNode, s: PSym): PNode =
|
|||
of skTemplate:
|
||||
result = semTemplateExpr(c, n, s, false)
|
||||
of skMacro:
|
||||
result = semMacroExpr(c, n, s, false)
|
||||
result = semMacroExpr(c, n, n, s, false)
|
||||
of skGenericParam:
|
||||
result = newSymNode(s, n.info)
|
||||
of skParam:
|
||||
|
|
@ -97,7 +97,7 @@ proc semGenericStmt(c: PContext, n: PNode,
|
|||
incl(s.flags, sfUsed)
|
||||
case s.kind
|
||||
of skMacro:
|
||||
result = semMacroExpr(c, n, s, false)
|
||||
result = semMacroExpr(c, n, n, s, false)
|
||||
of skTemplate:
|
||||
result = semTemplateExpr(c, n, s, false)
|
||||
# BUGFIX: we must not return here, we need to do first phase of
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue