fixes #7972
This commit is contained in:
parent
82a1576263
commit
ec4985a573
2 changed files with 28 additions and 10 deletions
|
|
@ -199,17 +199,20 @@ proc transformVarSection(c: PTransf, v: PNode): PTransNode =
|
|||
result[i] = defs
|
||||
|
||||
proc transformConstSection(c: PTransf, v: PNode): PTransNode =
|
||||
result = newTransNode(v)
|
||||
for i in countup(0, sonsLen(v)-1):
|
||||
var it = v.sons[i]
|
||||
if it.kind == nkCommentStmt:
|
||||
result[i] = PTransNode(it)
|
||||
else:
|
||||
if it.kind != nkConstDef: internalError(c.graph.config, it.info, "transformConstSection")
|
||||
if it.sons[0].kind != nkSym:
|
||||
internalError(c.graph.config, it.info, "transformConstSection")
|
||||
result = PTransNode(v)
|
||||
when false:
|
||||
result = newTransNode(v)
|
||||
for i in countup(0, sonsLen(v)-1):
|
||||
var it = v.sons[i]
|
||||
if it.kind == nkCommentStmt:
|
||||
result[i] = PTransNode(it)
|
||||
else:
|
||||
if it.kind != nkConstDef: internalError(c.graph.config, it.info, "transformConstSection")
|
||||
if it.sons[0].kind != nkSym:
|
||||
debug it.sons[0]
|
||||
internalError(c.graph.config, it.info, "transformConstSection")
|
||||
|
||||
result[i] = PTransNode(it)
|
||||
result[i] = PTransNode(it)
|
||||
|
||||
proc hasContinue(n: PNode): bool =
|
||||
case n.kind
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue