(?replace-aliases) ( yaml-anchors obj -- obj' )


Vocabulary
yaml.private

Inputs
yaml-anchorsan object
objan object


Outputs
obj'an object


Definition


:: (?replace-aliases) ( yaml-anchors obj -- obj' )
yaml-anchors objects>> :> objects obj objects at* [
[ yaml-anchors incr-anchor dup obj objects set-at ]
unless* <yaml-alias>
] [
drop f obj objects set-at
yaml-anchors obj (replace-aliases)
:> obj' obj obj' yaml-anchors new-objects>> set-at obj'
] if ;