1 #ifndef _C4_YML_EXTRA_EVENT_HANDLER_INTS_HPP_
2 #define _C4_YML_EXTRA_EVENT_HANDLER_INTS_HPP_
12 #ifndef RYML_SINGLE_HEADER
13 #ifndef _C4_YML_NODE_TYPE_HPP_
16 #ifndef _C4_YML_EVENT_HANDLER_STACK_HPP_
19 #ifndef _C4_YML_TAG_HPP_
22 #ifndef _C4_YML_DETAIL_DBGPRINT_HPP_
23 #include <c4/yml/detail/dbgprint.hpp>
162 C4_SUPPRESS_WARNING_GCC_CLANG_PUSH
163 C4_SUPPRESS_WARNING_GCC_CLANG(
"-Wold-style-cast")
164 C4_SUPPRESS_WARNING_GCC("-Wuseless-cast")
442 using state = EventHandlerIntsState;
456 bool m_has_yaml_directive;
460 #define _enable_(bits) _enable__<bits>()
461 #define _disable_(bits) _disable__<bits>()
462 #define _has_any_(bits) _has_any__<bits>()
473 reset(csubstr{}, substr{},
nullptr, 0);
484 m_curr->evt_type = {};
490 m_evt_size = dst_size;
494 m_has_yaml_directive =
false;
518 return m_evt_pos <= m_evt_size && m_arena_pos <= m_arena.len;
535 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, src.str == m_src.str);
536 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, src.len == m_src.len);
537 this->_stack_start_parse(filename, src, relocate_arena, relocate_arena_data);
542 if((_num_tag_directives() || m_has_yaml_directive) && !m_has_docs)
543 _RYML_ERR_PARSE_(m_stack.m_callbacks, m_curr->pos,
"directives cannot be used without a document");
544 this->_stack_finish_parse();
549 while(m_stack.size() > 1)
580 _c4dbgpf(
"{}/{}: begin_doc", m_evt_pos, m_evt_size);
582 if(_stack_should_push_on_begin_doc())
593 _c4dbgpf(
"{}/{}: end_doc", m_evt_pos, m_evt_size);
595 if(_stack_should_pop_on_end_doc())
605 _c4dbgpf(
"{}/{}: begin_doc_expl", m_evt_pos, m_evt_size);
615 _c4dbgpf(
"{}/{}: end_doc_expl", m_evt_pos, m_evt_size);
617 if(_stack_should_pop_on_end_doc())
622 m_has_yaml_directive =
false;
634 _c4dbgpf(
"{}/{}: bmap key flow", m_evt_pos, m_evt_size);
636 _mark_parent_with_children_();
642 _c4dbgpf(
"{}/{}: bmap key block", m_evt_pos, m_evt_size);
644 _mark_parent_with_children_();
651 _c4dbgpf(
"{}/{}: bmap flow", m_evt_pos, m_evt_size);
653 _mark_parent_with_children_();
659 _c4dbgpf(
"{}/{}: bmap block", m_evt_pos, m_evt_size);
661 _mark_parent_with_children_();
687 _c4dbgpf(
"{}/{}: bseq key flow", m_evt_pos, m_evt_size);
689 _mark_parent_with_children_();
695 _c4dbgpf(
"{}/{}: bseq key block", m_evt_pos, m_evt_size);
697 _mark_parent_with_children_();
704 _c4dbgpf(
"{}/{}: bseq flow", m_evt_pos, m_evt_size);
706 _mark_parent_with_children_();
712 _c4dbgpf(
"{}/{}: bseq block", m_evt_pos, m_evt_size);
714 _mark_parent_with_children_();
740 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, m_parent);
741 m_curr->evt_type = {};
751 _c4dbgpf(
"{}/{}: prev={} actually_val_is_first_key_of_new_map_flow", m_evt_pos, m_evt_size, m_evt_prev);
752 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, m_evt_pos > 2);
753 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, m_evt_prev > 0);
762 if(m_evt_prev + 1 < m_evt_size)
766 _c4dbgpf(
"{}/{}: WSTR", m_evt_pos, m_evt_size);
767 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, m_evt_prev > 0);
768 int32_t pos = _extend_left_to_include_tag_and_or_anchor(m_evt_prev);
769 if(m_evt_pos + 1 < m_evt_size)
771 for(int32_t i = pos; i <= m_evt_prev; i = _next(i))
776 int32_t num_move = m_evt_pos + 1 - pos;
777 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, num_move > 0);
778 memmove(m_evt + pos + 1, m_evt + pos, (
size_t)num_move *
sizeof(
ievt::DataType));
785 m_evt[pos + 1] &= ~ievt
::PSTR;
790 _c4dbgpf(
"{}/{}: container key", m_evt_pos, m_evt_size);
793 _c4dbgpf(
"{}/{}: find matching open for {}", m_evt_pos, m_evt_size, m_evt_prev);
800 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, (m_evt[m_evt_prev] &
ievt::ESEQ));
803 _c4dbgpf(
"{}/{}: matching open for {}={}", m_evt_pos, m_evt_size, m_evt_prev, pos);
804 _RYML_CHECK_BASIC_(m_stack.m_callbacks, pos >= 0);
805 _RYML_CHECK_BASIC_(m_stack.m_callbacks, pos < m_evt_prev);
806 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, (m_evt[pos] &
ievt::ESEQ) == (m_evt[m_evt_prev] &
ievt::BSEQ));
807 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, (m_evt[pos] &
ievt::EMAP) == (m_evt[m_evt_prev] &
ievt::BMAP));
809 int32_t posp1 = pos + 1;
810 if(m_evt_pos + 1 < m_evt_size)
812 int32_t num_move = m_evt_pos + 1 - pos;
813 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, num_move > 0);
814 memmove(m_evt + posp1, m_evt + pos, (
size_t)num_move *
sizeof(
ievt::DataType));
816 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, posp1 < m_evt_pos);
821 m_evt[posp1] &= ~ievt
::VAL_;
826 m_evt[posp1] &= ~ievt
::PSTR;
830 m_curr->evt_id = m_evt_pos - 2;
845 if(m_evt_prev < m_evt_size)
848 int32_t pos = _find_last_bdoc(m_evt_pos);
851 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, pos < m_evt_size);
852 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, pos < m_evt_pos);
854 if(m_evt_pos < m_evt_size)
857 int32_t num_move = m_evt_pos - pos;
858 int32_t posp1 = pos + 1;
860 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, num_move > 0);
861 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, 0 == (m_evt[posp1] &
ievt::PSTR));
862 memmove(m_evt + posp1, m_evt + pos, (
size_t)num_move *
sizeof(
ievt::DataType));
864 m_evt[posp1] &= ~ievt
::VAL_;
880 int32_t _find_last_bdoc(int32_t pos)
const
882 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, pos < m_evt_size);
894 _c4dbgpf(
"find_matching: start at {}", pos);
895 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, pos < m_evt_size);
896 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, (m_evt[pos] & close) == close);
897 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, (m_evt[pos] & open) == (close & ~
ievt::END_));
903 _c4dbgpf(
"find_matching: pos={} count={} e={}", pos, count, m_evt[pos]);
904 if((e & close) == close)
906 _c4dbgpf(
".............: pos={} close! count={} e={}", pos, count, m_evt[pos]);
909 else if((e & open) == open)
911 _c4dbgpf(
".............: pos={} open! count={} e={}", pos, count, m_evt[pos]);
919 _c4dbgpf(
"find_matching: not found!", 0);
922 int32_t _extend_left_to_include_tag_and_or_anchor(int32_t pos)
const
924 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, pos < m_evt_size);
925 int32_t prev = _prev(pos);
928 _c4dbgpf(
"{}/{}: {} is anchor/tag. extend to {}", m_evt_pos, m_evt_size, prev, prev);
934 C4_ALWAYS_INLINE int32_t _next(int32_t pos)
const noexcept
936 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, pos < m_evt_size);
937 return pos + ((m_evt[pos] &
ievt::WSTR) ? 3 : 1);
939 C4_ALWAYS_INLINE int32_t _prev(int32_t pos)
const noexcept
941 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, pos < m_evt_size);
942 return pos - ((m_evt[pos] &
ievt::PSTR) ? 3 : 1);
954 _c4dbgpf(
"{}/{}: set_key_scalar_plain_empty", m_evt_pos, m_evt_size);
955 _send_key_scalar_(_get_latest_empty_scalar(),
ievt::PLAI);
960 _c4dbgpf(
"{}/{}: set_val_scalar_plain_empty", m_evt_pos, m_evt_size);
961 _send_val_scalar_(_get_latest_empty_scalar(),
ievt::PLAI);
969 return m_src.first(0);
975 _c4dbgpf(
"{}/{}: set_key_scalar_plain: @{} [{}]~~~{}~~~", m_evt_pos, m_evt_size, scalar.str-m_src.str, scalar.len, scalar);
981 _c4dbgpf(
"{}/{}: set_val_scalar_plain: @{} [{}]~~~{}~~~", m_evt_pos, m_evt_size, scalar.str-m_src.str, scalar.len, scalar);
989 _c4dbgpf(
"{}/{}: set_key_scalar_dquo: @{} [{}]~~~{}~~~", m_evt_pos, m_evt_size, scalar.str?
size_t(scalar.str-m_src.str):m_src.len, scalar.len, scalar.str?scalar:csubstr{});
995 _c4dbgpf(
"{}/{}: set_val_scalar_dquo: @{} [{}]~~~{}~~~", m_evt_pos, m_evt_size, scalar.str?
size_t(scalar.str-m_src.str):m_src.len, scalar.len, scalar.str?scalar:csubstr{});
1003 _c4dbgpf(
"{}/{}: set_key_scalar_squo: @{} [{}]~~~{}~~~", m_evt_pos, m_evt_size, scalar.str-m_src.str, scalar.len, scalar);
1009 _c4dbgpf(
"{}/{}: set_val_scalar_squo: @{} [{}]~~~{}~~~", m_evt_pos, m_evt_size, scalar.str-m_src.str, scalar.len, scalar);
1017 _c4dbgpf(
"{}/{}: set_key_scalar_literal: @{} [{}]~~~{}~~~", m_evt_pos, m_evt_size, scalar.str?
size_t(scalar.str-m_src.str):m_src.len, scalar.len, scalar.str?scalar:csubstr{});
1023 _c4dbgpf(
"{}/{}: set_val_scalar_literal: @{} [{}]~~~{}~~~", m_evt_pos, m_evt_size, scalar.str?
size_t(scalar.str-m_src.str):m_src.len, scalar.len, scalar.str?scalar:csubstr{});
1031 _c4dbgpf(
"{}/{}: set_key_scalar_folded: @{} [{}]~~~{}~~~", m_evt_pos, m_evt_size, scalar.str?
size_t(scalar.str-m_src.str):m_src.len, scalar.len, scalar.str?scalar:csubstr{});
1037 _c4dbgpf(
"{}/{}: set_val_scalar_folded: @{} [{}]~~~{}~~~", m_evt_pos, m_evt_size, scalar.str?
size_t(scalar.str-m_src.str):m_src.len, scalar.len, scalar.str?scalar:csubstr{});
1045 _c4dbgpf(
"{}/{}: mark_key_scalar_unfiltered", m_evt_pos, m_evt_size);
1046 if(m_evt_pos < m_evt_size)
1051 _c4dbgpf(
"{}/{}: mark_val_scalar_unfiltered", m_evt_pos, m_evt_size);
1052 if(m_evt_pos < m_evt_size)
1061 #define _add_scalar_(i, scalar) \
1062 _c4dbgpf("{}/{}: scalar!", i, m_evt_size); \
1063 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, scalar.is_sub(m_src) || scalar.is_sub(m_arena) || (scalar.str == nullptr)); \
1064 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, m_evt[i] & ievt::WSTR); \
1065 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, i + 3 < m_evt_size); \
1066 if(C4_LIKELY(scalar.is_sub(m_src))) \
1068 m_evt[i + 1] = (ievt::DataType)(scalar.str - m_src.str); \
1072 m_evt[i] |= ievt::AREN; \
1073 m_evt[i + 1] = (ievt::DataType)(scalar.str - m_arena.str); \
1074 _c4dbgpf("{}/{}: arena! ->{}", i, m_evt_size, m_evt[i+1]); \
1076 m_evt[i + 2] = (ievt::DataType)scalar.len; \
1077 m_evt[i + 3] = ievt::PSTR
1085 _c4dbgpf(
"{}/{}: set_key_anchor", m_evt_pos, m_evt_size);
1088 if(m_evt_pos + 3 < m_evt_size)
1091 _add_scalar_(m_evt_pos, anchor);
1093 m_evt_prev = m_evt_pos;
1098 _c4dbgpf(
"{}/{}: set_val_anchor", m_evt_pos, m_evt_size);
1101 if(m_evt_pos + 3 < m_evt_size)
1104 _add_scalar_(m_evt_pos, anchor);
1106 m_evt_prev = m_evt_pos;
1112 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, ref.begins_with(
'*'));
1114 _RYML_ERR_PARSE_(m_stack.m_callbacks, m_curr->pos,
"key cannot have both anchor and ref");
1120 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, ref.begins_with(
'*'));
1122 _RYML_ERR_PARSE_(m_stack.m_callbacks, m_curr->pos,
"val cannot have both anchor and ref");
1136 _c4dbgpf(
"{}/{}: set key tag ~~~{}~~~", m_evt_pos, m_evt_size, tag);
1142 _c4dbgpf(
"{}/{}: set val tag [{}]~~~{}~~~", m_evt_pos, m_evt_size, tag.len, tag);
1148 csubstr ttag = _transform_directive(tag);
1149 _c4dbgpf(
"{}/{}: transformed_tag [{}]~~~{}~~~", m_evt_pos, m_evt_size, ttag.len, ttag);
1150 if(m_evt_pos + 3 < m_evt_size)
1153 _add_scalar_(m_evt_pos, ttag);
1155 m_evt_prev = m_evt_pos;
1168 _c4dbgpf(
"{}/{}: add directive ~~~{}~~~", m_evt_pos, m_evt_size, directive);
1169 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, directive.begins_with(
'%'));
1170 if(directive.begins_with(
"%TAG"))
1172 const id_type pos = _num_tag_directives();
1174 _RYML_ERR_PARSE_(m_stack.m_callbacks, m_curr->pos,
"too many directives");
1177 _RYML_ERR_PARSE_(m_stack.m_callbacks, m_curr->pos,
"failed to add directive");
1182 else if(directive.begins_with(
"%YAML"))
1184 _c4dbgpf(
"%YAML directive! ignoring...: {}", directive);
1185 if(C4_UNLIKELY(m_has_yaml_directive))
1186 _RYML_ERR_PARSE_(m_stack.m_callbacks, m_curr->pos,
"multiple yaml directives");
1187 m_has_yaml_directive =
true;
1188 csubstr rest = directive.sub(5).triml(
' ');
1193 _c4dbgpf(
"unknown directive! ignoring... {}", directive);
1206 return C4_LIKELY(m_arena_pos <= m_arena.len) ? m_arena.sub(m_arena_pos) : m_arena.last(0);
1212 substr s = arena_rem();
1213 if(C4_LIKELY(len <= s.len))
1225 return alloc_arena(len);
1237 m_curr->evt_type = {};
1246 template<c4::yml::type_bits bits> C4_ALWAYS_INLINE
void _enable__() noexcept
1248 m_curr->evt_type |= bits;
1250 template<c4::yml::type_bits bits> C4_ALWAYS_INLINE
void _disable__() noexcept
1252 m_curr->evt_type &= ~bits;
1254 template<c4::yml::type_bits bits> C4_ALWAYS_INLINE
bool _has_any__() const noexcept
1262 m_parent->has_children =
true;
1267 _c4dbgpf(
"{}/{}: flag only", m_evt_pos, m_evt_size);
1268 if(m_evt_pos < m_evt_size)
1269 m_evt[m_evt_pos] |= flags;
1270 m_curr->evt_id = m_evt_pos;
1271 m_evt_prev = m_evt_pos;
1273 if(m_evt_pos < m_evt_size)
1274 m_evt[m_evt_pos] = {};
1279 _c4dbgpf(
"{}/{}: key scalar", m_evt_pos, m_evt_size);
1280 if(m_evt_pos + 3 < m_evt_size)
1283 _add_scalar_(m_evt_pos, scalar);
1285 m_curr->evt_id = m_evt_pos;
1286 m_evt_prev = m_evt_pos;
1292 _c4dbgpf(
"{}/{}: val scalar", m_evt_pos, m_evt_size);
1293 if(m_evt_pos + 3 < m_evt_size)
1296 _add_scalar_(m_evt_pos, scalar);
1298 m_curr->evt_id = m_evt_pos;
1299 m_evt_prev = m_evt_pos;
1305 _c4dbgpf(
"{}/{}: send str", m_evt_pos, m_evt_size);
1306 if(m_evt_pos + 3 < m_evt_size)
1308 m_evt[m_evt_pos] |= flags;
1309 _add_scalar_(m_evt_pos, scalar);
1311 m_curr->evt_id = m_evt_pos;
1312 m_evt_prev = m_evt_pos;
1326 if(m_tag_directives[i].handle.empty())
1342 substr rem = arena_rem();
1343 size_t len = td.
transform(tag, rem, m_stack.m_callbacks,
false);
1347 return rem.first(len <= rem.len ? len : 0);
1350 if(tag.begins_with(
'!'))
1354 _RYML_ERR_PARSE_(m_stack.m_callbacks, m_curr->pos,
"tag not found");
1374 C4_SUPPRESS_WARNING_GCC_CLANG_POP
Callbacks const & get_callbacks()
get the global callbacks
int32_t estimate_events_ints_size(csubstr src)
Read YAML source and, without undergoing a full parse, estimate the size of the integer buffer requir...
uint32_t type_bits
the integral type necessary to cover all the bits for NodeType_e
@ VALANCH
the val has an &anchor
@ KEY_DQUO
mark key scalar as double quoted "
@ VALREF
a *reference: the val references an &anchor
@ VALNIL
the val is null (eg {a : } results in a null val)
@ MAP
a map: a parent of KEYVAL/KEYSEQ/KEYMAP nodes
@ VAL_FOLDED
mark val scalar as multiline, block folded >
@ KEYTAG
the key has a tag
@ FLOW_SL
mark container with single-line flow style (seqs as '[val1,val2], maps as '{key: val,...
@ VAL
a scalar: has a scalar (ie string) value, possibly empty. must be a leaf node, and cannot be MAP or S...
@ VALTAG
the val has a tag
@ SEQ
a seq: a parent of VAL/SEQ/MAP nodes
@ VAL_SQUO
mark val scalar as single quoted '
@ VAL_PLAIN
mark val scalar as plain scalar (unquoted, even when multiline)
@ KEYREF
a *reference: the key references an &anchor
@ BLOCK
mark container with block style (seqs as '- val ', maps as 'key: val')
@ KEYANCH
the key has an &anchor
@ VAL_DQUO
mark val scalar as double quoted "
@ KEY_SQUO
mark key scalar as single quoted '
@ VAL_LITERAL
mark val scalar as multiline, block literal |
@ KEY_LITERAL
mark key scalar as multiline, block literal |
@ KEY_PLAIN
mark key scalar as plain scalar (unquoted, even when multiline)
@ KEY_FOLDED
mark key scalar as multiline, block folded >
@ KEYNIL
the key is null (eg { : b} results in a null key)
bool is_custom_tag(csubstr tag)
#define RYML_MAX_TAG_DIRECTIVES
the maximum number of tag directives in a Tree
void(*)(void *, csubstr prev_arena, substr next_arena) pfn_relocate_arena
RYML_ID_TYPE id_type
The type of a node id in the YAML tree; to override the default type, define the macro RYML_ID_TYPE t...
@ RTOP
reading at top level
@ RUNK
reading unknown state (when starting): must determine whether scalar, map or seq
(Undefined by default) Use shorter error message from checks/asserts: do not show the check condition...
A c-style callbacks class to customize behavior on errors or allocation.
Use this class a base of implementations of event handler to simplify the stack logic.
bool create_from_str(csubstr directive_)
leaves next_node_id unfilled
id_type next_node_id
The next node to which this tag directive applies.
size_t transform(csubstr tag, substr output, Callbacks const &callbacks, bool with_brackets=true) const
A parser event handler that creates a compact representation of the YAML tree in a buffer of integers...
id_type _num_tag_directives() const
bool _has_any__() const noexcept
void begin_doc_expl()
explicit doc start, with —
void end_doc_expl()
explicit doc end, with ...
void set_val_anchor(csubstr anchor)
void _send_key_scalar_(csubstr scalar, ievt::DataType flags)
void set_key_scalar_literal(csubstr scalar)
void set_val_scalar_plain_empty()
void begin_map_val_block()
substr alloc_arena(size_t len, substr *relocated)
this may fail, in which case an empty string is returned
bool fits_buffers() const
Predicate to test if the event buffer successfully accomodated all the parse events.
void begin_doc()
implicit doc start (without —)
void _send_flag_only_(ievt::DataType flags)
void begin_map_key_block()
void set_key_tag(csubstr tag)
void _enable__() noexcept
substr alloc_arena(size_t len)
this may fail, in which case a an empty string is returned
void mark_val_scalar_unfiltered()
void actually_val_is_first_key_of_new_map_flow()
set the previous val as the first key of a new map, with flow style.
void begin_seq_val_block()
void _set_tag(csubstr tag, ievt::DataType which)
void set_key_scalar_squoted(csubstr scalar)
void add_directive(csubstr directive)
void set_key_scalar_folded(csubstr scalar)
void start_parse(const char *filename, csubstr src, c4::yml::detail::pfn_relocate_arena relocate_arena, void *relocate_arena_data)
void set_key_anchor(csubstr anchor)
EventHandlerInts(c4::yml::Callbacks const &cb)
void set_key_scalar_plain_empty()
void set_val_ref(csubstr ref)
void begin_map_val_flow()
void set_key_scalar_plain(csubstr scalar)
void actually_val_is_first_key_of_new_map_block()
like its flow counterpart, but this function can only be called after the end of a flow-val at root o...
void set_val_scalar_literal(csubstr scalar)
void _clear_tag_directives_()
int required_size_events() const
get the size needed for the event buffer from the previous parse
void set_val_scalar_folded(csubstr scalar)
void set_val_scalar_dquoted(csubstr scalar)
void _pop()
end the current scope
void _send_str_(csubstr scalar, ievt::DataType flags)
void set_key_scalar_dquoted(csubstr scalar)
void begin_seq_key_flow()
csubstr _get_latest_empty_scalar() const
EventHandlerIntsState state
void _send_val_scalar_(csubstr scalar, ievt::DataType flags)
size_t required_size_arena() const
get the size needed for the arena from the previous parse
csubstr _transform_directive(csubstr tag)
void mark_key_scalar_unfiltered()
void set_key_ref(csubstr ref)
void begin_seq_key_block()
void set_val_scalar_plain(csubstr scalar)
void end_doc()
implicit doc end (without ...)
ievt::DataType value_type
void _push()
push a new parent, add a child to the new parent, and set the child as the current node
void begin_seq_val_flow()
void set_val_scalar_squoted(csubstr scalar)
void begin_map_key_flow()
void _mark_parent_with_children_()
void reset(csubstr str, substr arena, ievt::DataType *dst, int32_t dst_size)
void _disable__() noexcept
void set_val_tag(csubstr tag)