fixes a weird quote do regression
This commit is contained in:
parent
1c03604ec6
commit
3f87453981
2 changed files with 3 additions and 2 deletions
|
|
@ -2019,7 +2019,8 @@ proc semQuoteAst(c: PContext, n: PNode): PNode =
|
|||
var tmpl = semTemplateDef(c, dummyTemplate)
|
||||
quotes[0] = tmpl[namePos]
|
||||
# This adds a call to newIdentNode("result") as the first argument to the template call
|
||||
quotes[1] = newNode(nkCall, n.info, @[newIdentNode(getIdent(c.cache, "newIdentNode"), n.info), newStrNode(nkStrLit, "result")])
|
||||
let identNode = getCompilerProc(c.graph, "newIdentNode")
|
||||
quotes[1] = newNode(nkCall, n.info, @[identNode.newSymNode, newStrNode(nkStrLit, "result")])
|
||||
result = newNode(nkCall, n.info, @[
|
||||
createMagic(c.graph, "getAst", mExpandToAst).newSymNode,
|
||||
newNode(nkCall, n.info, quotes)])
|
||||
|
|
|
|||
|
|
@ -446,7 +446,7 @@ proc newIdentNode*(i: NimIdent): NimNode {.compileTime, deprecated.} =
|
|||
|
||||
{.pop.}
|
||||
|
||||
proc newIdentNode*(i: string): NimNode {.magic: "StrToIdent", noSideEffect.}
|
||||
proc newIdentNode*(i: string): NimNode {.magic: "StrToIdent", noSideEffect, compilerproc.}
|
||||
## creates an identifier node from `i`. It is simply an alias for
|
||||
## ``ident(string)``. Use that, it's shorter.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue