mirror of https://github.com/status-im/NimYAML.git
force vals in `quote do` to bool due to compile time when changes
This commit is contained in:
parent
011c99270f
commit
7ad13d98d9
|
@ -985,11 +985,11 @@ macro genRepresentObject(t: typedesc, value, childTagStyle: typed): typed =
|
||||||
childAccessor = newDotExpr(value, newIdentNode(name))
|
childAccessor = newDotExpr(value, newIdentNode(name))
|
||||||
result.add(quote do:
|
result.add(quote do:
|
||||||
when `tSym` == -1 or `fieldIndex` notin transientVectors[`tSym`]:
|
when `tSym` == -1 or `fieldIndex` notin transientVectors[`tSym`]:
|
||||||
when `isVO`: c.put(startMapEvent(yTagQuestionMark, yAnchorNone))
|
when bool(`isVO`): c.put(startMapEvent(yTagQuestionMark, yAnchorNone))
|
||||||
c.put(scalarEvent(`name`, if `childTagStyle` == tsNone:
|
c.put(scalarEvent(`name`, if `childTagStyle` == tsNone:
|
||||||
yTagQuestionMark else: yTagNimField, yAnchorNone))
|
yTagQuestionMark else: yTagNimField, yAnchorNone))
|
||||||
representChild(`childAccessor`, `childTagStyle`, c)
|
representChild(`childAccessor`, `childTagStyle`, c)
|
||||||
when `isVO`: c.put(endMapEvent())
|
when bool(`isVO`): c.put(endMapEvent())
|
||||||
)
|
)
|
||||||
inc(fieldIndex)
|
inc(fieldIndex)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue