fixes a renderer regression that affects c2nim
This commit is contained in:
parent
8cdd89f456
commit
ac3e3cf2b0
1 changed files with 4 additions and 1 deletions
|
|
@ -1011,7 +1011,10 @@ proc gsub(g: var TSrcGen, n: PNode, c: TContext) =
|
|||
of nkPrefix:
|
||||
gsub(g, n, 0)
|
||||
if n.len > 1:
|
||||
if n[1].kind == nkPrefix:
|
||||
let opr = if n[0].kind == nkIdent: n[0].ident
|
||||
elif n[0].kind == nkSym: n[0].sym.name
|
||||
else: nil
|
||||
if n[1].kind == nkPrefix or (opr != nil and renderer.isKeyword(opr)):
|
||||
put(g, tkSpaces, Space)
|
||||
if n.sons[1].kind == nkInfix:
|
||||
put(g, tkParLe, "(")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue