Serializer.anchorable

bool anchorable(ref Node node) @safe

Determine if it's a good idea to add an anchor to a node.

Used to prevent associating every single repeating scalar with an anchor/alias - only nodes long enough can use anchors.

Parameters

nodeNode to check for anchorability.

Returns

True if the node is anchorable, false otherwise.