mirror of https://github.com/status-im/NimYAML.git
Don't generate anchors at comptime when dumping
* this is a prerequisite to getting dumping to work, but dumping is still blocked by #138
This commit is contained in:
parent
f60725fc93
commit
1597efa90a
|
@ -1616,6 +1616,8 @@ proc representChild*[O](
|
|||
value: ref O,
|
||||
) =
|
||||
if isNil(value): ctx.put(scalarEvent("~", yTagNull))
|
||||
else:
|
||||
when nimvm: discard
|
||||
else:
|
||||
let p = cast[pointer](value)
|
||||
# when c.anchorStyle == asNone, `referenced` is used as indicator that we are
|
||||
|
@ -1654,6 +1656,8 @@ proc representChild*[O](
|
|||
ctx.putImpl = origPut
|
||||
ctx.put(ex)
|
||||
ctx.representChild(value[])
|
||||
when nimvm: discard
|
||||
else:
|
||||
if ctx.options.anchorStyle == asNone: ctx.refs[p] = (val.a, false)
|
||||
|
||||
proc representChild*[T](
|
||||
|
|
Loading…
Reference in New Issue