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 _c4dbgpf(
"{}/{}: prev={} actually_val_is_first_key_of_new_map_block", m_evt_pos, m_evt_size, m_evt_prev);
846 if(m_evt_prev < m_evt_size)
849 int32_t pos = _find_last_bdoc(m_evt_pos);
852 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, pos < m_evt_size);
853 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, pos < m_evt_pos);
855 if(m_evt_pos < m_evt_size)
858 int32_t num_move = m_evt_pos - pos;
859 int32_t posp1 = pos + 1;
861 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, num_move > 0);
862 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, 0 == (m_evt[posp1] &
ievt::PSTR));
863 memmove(m_evt + posp1, m_evt + pos, (
size_t)num_move *
sizeof(
ievt::DataType));
865 m_evt[posp1] &= ~ievt
::VAL_;
881 int32_t _find_last_bdoc(int32_t pos)
const
883 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, pos < m_evt_size);
895 _c4dbgpf(
"find_matching: start at {}", pos);
896 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, pos < m_evt_size);
897 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, (m_evt[pos] & close) == close);
898 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, (m_evt[pos] & open) == (close & ~
ievt::END_));
904 _c4dbgpf(
"find_matching: pos={} count={} e={}", pos, count, m_evt[pos]);
905 if((e & close) == close)
907 _c4dbgpf(
".............: pos={} close! count={} e={}", pos, count, m_evt[pos]);
910 else if((e & open) == open)
912 _c4dbgpf(
".............: pos={} open! count={} e={}", pos, count, m_evt[pos]);
920 _c4dbgpf(
"find_matching: not found!", 0);
923 int32_t _extend_left_to_include_tag_and_or_anchor(int32_t pos)
const
925 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, pos < m_evt_size);
926 int32_t prev = _prev(pos);
929 _c4dbgpf(
"{}/{}: {} is anchor/tag. extend to {}", m_evt_pos, m_evt_size, prev, prev);
935 C4_ALWAYS_INLINE int32_t _next(int32_t pos)
const noexcept
937 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, pos < m_evt_size);
938 return pos + ((m_evt[pos] &
ievt::WSTR) ? 3 : 1);
940 C4_ALWAYS_INLINE int32_t _prev(int32_t pos)
const noexcept
942 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, pos < m_evt_size);
943 return pos - ((m_evt[pos] &
ievt::PSTR) ? 3 : 1);
955 _c4dbgpf(
"{}/{}: set_key_scalar_plain_empty", m_evt_pos, m_evt_size);
956 _send_key_scalar_(_get_latest_empty_scalar(),
ievt::PLAI);
961 _c4dbgpf(
"{}/{}: set_val_scalar_plain_empty", m_evt_pos, m_evt_size);
962 _send_val_scalar_(_get_latest_empty_scalar(),
ievt::PLAI);
970 return m_src.first(0);
976 _c4dbgpf(
"{}/{}: set_key_scalar_plain: @{} [{}]~~~{}~~~", m_evt_pos, m_evt_size, scalar.str-m_src.str, scalar.len, scalar);
982 _c4dbgpf(
"{}/{}: set_val_scalar_plain: @{} [{}]~~~{}~~~", m_evt_pos, m_evt_size, scalar.str-m_src.str, scalar.len, scalar);
990 _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{});
996 _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{});
1004 _c4dbgpf(
"{}/{}: set_key_scalar_squo: @{} [{}]~~~{}~~~", m_evt_pos, m_evt_size, scalar.str-m_src.str, scalar.len, scalar);
1010 _c4dbgpf(
"{}/{}: set_val_scalar_squo: @{} [{}]~~~{}~~~", m_evt_pos, m_evt_size, scalar.str-m_src.str, scalar.len, scalar);
1018 _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{});
1024 _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{});
1032 _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{});
1038 _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{});
1046 _c4dbgpf(
"{}/{}: mark_key_scalar_unfiltered", m_evt_pos, m_evt_size);
1047 if(m_evt_pos < m_evt_size)
1052 _c4dbgpf(
"{}/{}: mark_val_scalar_unfiltered", m_evt_pos, m_evt_size);
1053 if(m_evt_pos < m_evt_size)
1062 #define _add_scalar_(i, scalar) \
1063 _c4dbgpf("{}/{}: scalar!", i, m_evt_size); \
1064 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, scalar.is_sub(m_src) || scalar.is_sub(m_arena) || (scalar.str == nullptr)); \
1065 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, m_evt[i] & ievt::WSTR); \
1066 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, i + 3 < m_evt_size); \
1067 if(C4_LIKELY(scalar.is_sub(m_src))) \
1069 m_evt[i + 1] = (ievt::DataType)(scalar.str - m_src.str); \
1073 m_evt[i] |= ievt::AREN; \
1074 m_evt[i + 1] = (ievt::DataType)(scalar.str - m_arena.str); \
1075 _c4dbgpf("{}/{}: arena! ->{}", i, m_evt_size, m_evt[i+1]); \
1077 m_evt[i + 2] = (ievt::DataType)scalar.len; \
1078 m_evt[i + 3] = ievt::PSTR
1086 _c4dbgpf(
"{}/{}: set_key_anchor", m_evt_pos, m_evt_size);
1089 if(m_evt_pos + 3 < m_evt_size)
1092 _add_scalar_(m_evt_pos, anchor);
1094 m_evt_prev = m_evt_pos;
1099 _c4dbgpf(
"{}/{}: set_val_anchor", m_evt_pos, m_evt_size);
1102 if(m_evt_pos + 3 < m_evt_size)
1105 _add_scalar_(m_evt_pos, anchor);
1107 m_evt_prev = m_evt_pos;
1113 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, ref.begins_with(
'*'));
1115 _RYML_ERR_PARSE_(m_stack.m_callbacks, m_curr->pos,
"key cannot have both anchor and ref");
1121 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, ref.begins_with(
'*'));
1123 _RYML_ERR_PARSE_(m_stack.m_callbacks, m_curr->pos,
"val cannot have both anchor and ref");
1137 _c4dbgpf(
"{}/{}: set key tag ~~~{}~~~", m_evt_pos, m_evt_size, tag);
1143 _c4dbgpf(
"{}/{}: set val tag [{}]~~~{}~~~", m_evt_pos, m_evt_size, tag.len, tag);
1149 csubstr ttag = _transform_directive(tag);
1150 _c4dbgpf(
"{}/{}: transformed_tag [{}]~~~{}~~~", m_evt_pos, m_evt_size, ttag.len, ttag);
1151 if(m_evt_pos + 3 < m_evt_size)
1154 _add_scalar_(m_evt_pos, ttag);
1156 m_evt_prev = m_evt_pos;
1169 _c4dbgpf(
"{}/{}: add directive ~~~{}~~~", m_evt_pos, m_evt_size, directive);
1170 _RYML_ASSERT_BASIC_(m_stack.m_callbacks, directive.begins_with(
'%'));
1171 if(directive.begins_with(
"%TAG"))
1173 const id_type pos = _num_tag_directives();
1175 _RYML_ERR_PARSE_(m_stack.m_callbacks, m_curr->pos,
"too many directives");
1178 _RYML_ERR_PARSE_(m_stack.m_callbacks, m_curr->pos,
"failed to add directive");
1183 else if(directive.begins_with(
"%YAML"))
1185 _c4dbgpf(
"%YAML directive! ignoring...: {}", directive);
1186 if(C4_UNLIKELY(m_has_yaml_directive))
1187 _RYML_ERR_PARSE_(m_stack.m_callbacks, m_curr->pos,
"multiple yaml directives");
1188 m_has_yaml_directive =
true;
1189 csubstr rest = directive.sub(5).triml(
' ');
1194 _c4dbgpf(
"unknown directive! ignoring... {}", directive);
1207 return C4_LIKELY(m_arena_pos <= m_arena.len) ? m_arena.sub(m_arena_pos) : m_arena.last(0);
1213 substr s = arena_rem();
1214 if(C4_LIKELY(len <= s.len))
1226 return alloc_arena(len);
1238 m_curr->evt_type = {};
1247 template<c4::yml::type_bits bits> C4_ALWAYS_INLINE
void _enable__() noexcept
1249 m_curr->evt_type |= bits;
1251 template<c4::yml::type_bits bits> C4_ALWAYS_INLINE
void _disable__() noexcept
1253 m_curr->evt_type &= ~bits;
1255 template<c4::yml::type_bits bits> C4_ALWAYS_INLINE
bool _has_any__() const noexcept
1263 m_parent->has_children =
true;
1268 _c4dbgpf(
"{}/{}: flag only", m_evt_pos, m_evt_size);
1269 if(m_evt_pos < m_evt_size)
1270 m_evt[m_evt_pos] |= flags;
1271 m_curr->evt_id = m_evt_pos;
1272 m_evt_prev = m_evt_pos;
1274 if(m_evt_pos < m_evt_size)
1275 m_evt[m_evt_pos] = {};
1280 _c4dbgpf(
"{}/{}: key scalar", m_evt_pos, m_evt_size);
1281 if(m_evt_pos + 3 < m_evt_size)
1284 _add_scalar_(m_evt_pos, scalar);
1286 m_curr->evt_id = m_evt_pos;
1287 m_evt_prev = m_evt_pos;
1293 _c4dbgpf(
"{}/{}: val scalar", m_evt_pos, m_evt_size);
1294 if(m_evt_pos + 3 < m_evt_size)
1297 _add_scalar_(m_evt_pos, scalar);
1299 m_curr->evt_id = m_evt_pos;
1300 m_evt_prev = m_evt_pos;
1306 _c4dbgpf(
"{}/{}: send str", m_evt_pos, m_evt_size);
1307 if(m_evt_pos + 3 < m_evt_size)
1309 m_evt[m_evt_pos] |= flags;
1310 _add_scalar_(m_evt_pos, scalar);
1312 m_curr->evt_id = m_evt_pos;
1313 m_evt_prev = m_evt_pos;
1327 if(m_tag_directives[i].handle.empty())
1343 substr rem = arena_rem();
1344 size_t len = td.
transform(tag, rem, m_stack.m_callbacks,
false);
1348 return rem.first(len <= rem.len ? len : 0);
1351 if(tag.begins_with(
'!'))
1355 _RYML_ERR_PARSE_(m_stack.m_callbacks, m_curr->pos,
"tag not found");
1375 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)