diff --git a/src/c4/yml/parse_engine.def.hpp b/src/c4/yml/parse_engine.def.hpp index b28e290e..d5a4e136 100644 --- a/src/c4/yml/parse_engine.def.hpp +++ b/src/c4/yml/parse_engine.def.hpp @@ -2136,7 +2136,7 @@ void ParseEngine::_scan_block(ScannedBlock *C4_RESTRICT sb, size_t template template -bool ParseEngine::_filter_ws_handle_to_first_non_space(FilterProcessor &proc) noexcept +bool ParseEngine::_filter_ws_handle_to_first_non_space(FilterProcessor &proc) { _c4dbgfws("found whitespace '{}'", _c4prc(proc.curr())); _RYML_CB_ASSERT(this->callbacks(), proc.curr() == ' ' || proc.curr() == '\t'); @@ -2164,7 +2164,7 @@ bool ParseEngine::_filter_ws_handle_to_first_non_space(FilterProce template template -void ParseEngine::_filter_ws_copy_trailing(FilterProcessor &proc) noexcept +void ParseEngine::_filter_ws_copy_trailing(FilterProcessor &proc) { if(!_filter_ws_handle_to_first_non_space(proc)) { @@ -2175,7 +2175,7 @@ void ParseEngine::_filter_ws_copy_trailing(FilterProcessor &proc) template template -void ParseEngine::_filter_ws_skip_trailing(FilterProcessor &proc) noexcept +void ParseEngine::_filter_ws_skip_trailing(FilterProcessor &proc) { if(!_filter_ws_handle_to_first_non_space(proc)) { @@ -2201,7 +2201,7 @@ void ParseEngine::_filter_ws_skip_trailing(FilterProcessor &proc) template template -void ParseEngine::_filter_nl_plain(FilterProcessor &C4_RESTRICT proc, size_t indentation) noexcept +void ParseEngine::_filter_nl_plain(FilterProcessor &C4_RESTRICT proc, size_t indentation) { _RYML_CB_ASSERT(this->callbacks(), proc.curr() == '\n'); @@ -2232,7 +2232,7 @@ void ParseEngine::_filter_nl_plain(FilterProcessor &C4_RESTRICT pr template template -auto ParseEngine::_filter_plain(FilterProcessor &C4_RESTRICT proc, size_t indentation) noexcept -> decltype(proc.result()) +auto ParseEngine::_filter_plain(FilterProcessor &C4_RESTRICT proc, size_t indentation) -> decltype(proc.result()) { _RYML_CB_ASSERT(this->callbacks(), indentation != npos); _c4dbgfps("before=[{}]~~~{}~~~", proc.src.len, proc.src); @@ -2271,14 +2271,14 @@ auto ParseEngine::_filter_plain(FilterProcessor &C4_RESTRICT proc, template -FilterResult ParseEngine::filter_scalar_plain(csubstr scalar, substr dst, size_t indentation) noexcept +FilterResult ParseEngine::filter_scalar_plain(csubstr scalar, substr dst, size_t indentation) { FilterProcessorSrcDst proc(scalar, dst); return _filter_plain(proc, indentation); } template -FilterResult ParseEngine::filter_scalar_plain_in_place(substr dst, size_t cap, size_t indentation) noexcept +FilterResult ParseEngine::filter_scalar_plain_in_place(substr dst, size_t cap, size_t indentation) { FilterProcessorInplaceEndExtending proc(dst, cap); return _filter_plain(proc, indentation); @@ -2299,7 +2299,7 @@ FilterResult ParseEngine::filter_scalar_plain_in_place(substr dst, template template -void ParseEngine::_filter_nl_squoted(FilterProcessor &C4_RESTRICT proc) noexcept +void ParseEngine::_filter_nl_squoted(FilterProcessor &C4_RESTRICT proc) { _RYML_CB_ASSERT(this->callbacks(), proc.curr() == '\n'); @@ -2330,7 +2330,7 @@ void ParseEngine::_filter_nl_squoted(FilterProcessor &C4_RESTRICT template template -auto ParseEngine::_filter_squoted(FilterProcessor &C4_RESTRICT proc) noexcept -> decltype(proc.result()) +auto ParseEngine::_filter_squoted(FilterProcessor &C4_RESTRICT proc) -> decltype(proc.result()) { _c4dbgfsq("before=[{}]~~~{}~~~", proc.src.len, proc.src); @@ -2378,14 +2378,14 @@ auto ParseEngine::_filter_squoted(FilterProcessor &C4_RESTRICT pro #undef _c4dbgfsq template -FilterResult ParseEngine::filter_scalar_squoted(csubstr scalar, substr dst) noexcept +FilterResult ParseEngine::filter_scalar_squoted(csubstr scalar, substr dst) { FilterProcessorSrcDst proc(scalar, dst); return _filter_squoted(proc); } template -FilterResult ParseEngine::filter_scalar_squoted_in_place(substr dst, size_t cap) noexcept +FilterResult ParseEngine::filter_scalar_squoted_in_place(substr dst, size_t cap) { FilterProcessorInplaceEndExtending proc(dst, cap); return _filter_squoted(proc); @@ -2406,7 +2406,7 @@ FilterResult ParseEngine::filter_scalar_squoted_in_place(substr ds template template -void ParseEngine::_filter_nl_dquoted(FilterProcessor &C4_RESTRICT proc) noexcept +void ParseEngine::_filter_nl_dquoted(FilterProcessor &C4_RESTRICT proc) { _RYML_CB_ASSERT(this->callbacks(), proc.curr() == '\n'); @@ -2686,7 +2686,7 @@ FilterResultExtending ParseEngine::filter_scalar_dquoted_in_place( template template -void ParseEngine::_filter_chomp(FilterProcessor &C4_RESTRICT proc, BlockChomp_e chomp, size_t indentation) noexcept +void ParseEngine::_filter_chomp(FilterProcessor &C4_RESTRICT proc, BlockChomp_e chomp, size_t indentation) { _RYML_CB_ASSERT(this->callbacks(), chomp == CHOMP_CLIP || chomp == CHOMP_KEEP || chomp == CHOMP_STRIP); _RYML_CB_ASSERT(this->callbacks(), proc.rem().first_not_of(" \n\r") == npos); @@ -2832,7 +2832,7 @@ void ParseEngine::_filter_chomp(FilterProcessor &C4_RESTRICT proc, template template -void ParseEngine::_filter_block_indentation(FilterProcessor &C4_RESTRICT proc, size_t indentation) noexcept +void ParseEngine::_filter_block_indentation(FilterProcessor &C4_RESTRICT proc, size_t indentation) { csubstr rem = proc.rem(); // remaining if(rem.len) @@ -2877,7 +2877,7 @@ void ParseEngine::_filter_block_indentation(FilterProcessor &C4_RE template template -size_t ParseEngine::_handle_all_whitespace(FilterProcessor &C4_RESTRICT proc, BlockChomp_e chomp) noexcept +size_t ParseEngine::_handle_all_whitespace(FilterProcessor &C4_RESTRICT proc, BlockChomp_e chomp) { csubstr contents = proc.src.trimr(" \n\r"); _c4dbgfb("ws: contents_len={} wslen={}", contents.len, proc.src.len-contents.len); @@ -2906,7 +2906,7 @@ size_t ParseEngine::_handle_all_whitespace(FilterProcessor &C4_RES template template -size_t ParseEngine::_extend_to_chomp(FilterProcessor &C4_RESTRICT proc, size_t contents_len) noexcept +size_t ParseEngine::_extend_to_chomp(FilterProcessor &C4_RESTRICT proc, size_t contents_len) { _c4dbgfb("contents_len={}", contents_len); @@ -2945,7 +2945,7 @@ size_t ParseEngine::_extend_to_chomp(FilterProcessor &C4_RESTRICT template template -auto ParseEngine::_filter_block_literal(FilterProcessor &C4_RESTRICT proc, size_t indentation, BlockChomp_e chomp) noexcept -> decltype(proc.result()) +auto ParseEngine::_filter_block_literal(FilterProcessor &C4_RESTRICT proc, size_t indentation, BlockChomp_e chomp) -> decltype(proc.result()) { _c4dbgfbl("indentation={} before=[{}]~~~{}~~~", indentation, proc.src.len, proc.src); @@ -2994,14 +2994,14 @@ auto ParseEngine::_filter_block_literal(FilterProcessor &C4_RESTRI #undef _c4dbgfbl template -FilterResult ParseEngine::filter_scalar_block_literal(csubstr scalar, substr dst, size_t indentation, BlockChomp_e chomp) noexcept +FilterResult ParseEngine::filter_scalar_block_literal(csubstr scalar, substr dst, size_t indentation, BlockChomp_e chomp) { FilterProcessorSrcDst proc(scalar, dst); return _filter_block_literal(proc, indentation, chomp); } template -FilterResult ParseEngine::filter_scalar_block_literal_in_place(substr scalar, size_t cap, size_t indentation, BlockChomp_e chomp) noexcept +FilterResult ParseEngine::filter_scalar_block_literal_in_place(substr scalar, size_t cap, size_t indentation, BlockChomp_e chomp) { FilterProcessorInplaceEndExtending proc(scalar, cap); return _filter_block_literal(proc, indentation, chomp); @@ -3022,7 +3022,7 @@ FilterResult ParseEngine::filter_scalar_block_literal_in_place(sub template template -void ParseEngine::_filter_block_folded_newlines_leading(FilterProcessor &C4_RESTRICT proc, size_t indentation, size_t len) noexcept +void ParseEngine::_filter_block_folded_newlines_leading(FilterProcessor &C4_RESTRICT proc, size_t indentation, size_t len) { _filter_block_indentation(proc, indentation); while(proc.has_more_chars(len)) @@ -3059,7 +3059,7 @@ void ParseEngine::_filter_block_folded_newlines_leading(FilterProc template template -size_t ParseEngine::_filter_block_folded_newlines_compress(FilterProcessor &C4_RESTRICT proc, size_t num_newl, size_t wpos_at_first_newl) noexcept +size_t ParseEngine::_filter_block_folded_newlines_compress(FilterProcessor &C4_RESTRICT proc, size_t num_newl, size_t wpos_at_first_newl) { switch(num_newl) { @@ -3088,7 +3088,7 @@ size_t ParseEngine::_filter_block_folded_newlines_compress(FilterP template template -void ParseEngine::_filter_block_folded_newlines(FilterProcessor &C4_RESTRICT proc, size_t indentation, size_t len) noexcept +void ParseEngine::_filter_block_folded_newlines(FilterProcessor &C4_RESTRICT proc, size_t indentation, size_t len) { _RYML_CB_ASSERT(this->callbacks(), proc.curr() == '\n'); size_t num_newl = 0; @@ -3232,7 +3232,7 @@ void ParseEngine::_filter_block_folded_indented_block(FilterProces template template -auto ParseEngine::_filter_block_folded(FilterProcessor &C4_RESTRICT proc, size_t indentation, BlockChomp_e chomp) noexcept -> decltype(proc.result()) +auto ParseEngine::_filter_block_folded(FilterProcessor &C4_RESTRICT proc, size_t indentation, BlockChomp_e chomp) -> decltype(proc.result()) { _c4dbgfbf("indentation={} before=[{}]~~~{}~~~", indentation, proc.src.len, proc.src); @@ -3280,14 +3280,14 @@ auto ParseEngine::_filter_block_folded(FilterProcessor &C4_RESTRIC #undef _c4dbgfbf template -FilterResult ParseEngine::filter_scalar_block_folded(csubstr scalar, substr dst, size_t indentation, BlockChomp_e chomp) noexcept +FilterResult ParseEngine::filter_scalar_block_folded(csubstr scalar, substr dst, size_t indentation, BlockChomp_e chomp) { FilterProcessorSrcDst proc(scalar, dst); return _filter_block_folded(proc, indentation, chomp); } template -FilterResult ParseEngine::filter_scalar_block_folded_in_place(substr scalar, size_t cap, size_t indentation, BlockChomp_e chomp) noexcept +FilterResult ParseEngine::filter_scalar_block_folded_in_place(substr scalar, size_t cap, size_t indentation, BlockChomp_e chomp) { FilterProcessorInplaceEndExtending proc(scalar, cap); return _filter_block_folded(proc, indentation, chomp); diff --git a/src/c4/yml/parse_engine.hpp b/src/c4/yml/parse_engine.hpp index 8231b393..5cca1198 100644 --- a/src/c4/yml/parse_engine.hpp +++ b/src/c4/yml/parse_engine.hpp @@ -403,34 +403,34 @@ class ParseEngine public: - /** @name deprecated parse_methods + /** @name deprecated parse methods * @{ */ /** @cond dev */ - template RYML_DEPRECATED("deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_place(csubstr filename, substr yaml, Tree *t, size_t node_id); - template RYML_DEPRECATED("deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_place( substr yaml, Tree *t, size_t node_id); - template RYML_DEPRECATED("deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_place(csubstr filename, substr yaml, Tree *t ); - template RYML_DEPRECATED("deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_place( substr yaml, Tree *t ); - template RYML_DEPRECATED("deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_place(csubstr filename, substr yaml, NodeRef node ); - template RYML_DEPRECATED("deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_place( substr yaml, NodeRef node ); - template RYML_DEPRECATED("deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_place(csubstr filename, substr yaml ); - template RYML_DEPRECATED("deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_place( substr yaml ); - template RYML_DEPRECATED("deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_arena(csubstr filename, csubstr yaml, Tree *t, size_t node_id); - template RYML_DEPRECATED("deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_arena( csubstr yaml, Tree *t, size_t node_id); - template RYML_DEPRECATED("deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_arena(csubstr filename, csubstr yaml, Tree *t ); - template RYML_DEPRECATED("deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_arena( csubstr yaml, Tree *t ); - template RYML_DEPRECATED("deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_arena(csubstr filename, csubstr yaml, NodeRef node ); - template RYML_DEPRECATED("deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_arena( csubstr yaml, NodeRef node ); - template RYML_DEPRECATED("deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_arena(csubstr filename, csubstr yaml ); - template RYML_DEPRECATED("deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_arena( csubstr yaml ); - template RYML_DEPRECATED("deliberately undefined. use the freestanding csubstr version in parse.hpp.") typename std::enable_if::type parse_in_arena(csubstr filename, substr yaml, Tree *t, size_t node_id); - template RYML_DEPRECATED("deliberately undefined. use the freestanding csubstr version in parse.hpp.") typename std::enable_if::type parse_in_arena( substr yaml, Tree *t, size_t node_id); - template RYML_DEPRECATED("deliberately undefined. use the freestanding csubstr version in parse.hpp.") typename std::enable_if::type parse_in_arena(csubstr filename, substr yaml, Tree *t ); - template RYML_DEPRECATED("deliberately undefined. use the freestanding csubstr version in parse.hpp.") typename std::enable_if::type parse_in_arena( substr yaml, Tree *t ); - template RYML_DEPRECATED("deliberately undefined. use the freestanding csubstr version in parse.hpp.") typename std::enable_if::type parse_in_arena(csubstr filename, substr yaml, NodeRef node ); - template RYML_DEPRECATED("deliberately undefined. use the freestanding csubstr version in parse.hpp.") typename std::enable_if::type parse_in_arena( substr yaml, NodeRef node ); - template RYML_DEPRECATED("deliberately undefined. use the freestanding csubstr version in parse.hpp.") typename std::enable_if::type parse_in_arena(csubstr filename, substr yaml ); - template RYML_DEPRECATED("deliberately undefined. use the freestanding csubstr version in parse.hpp.") typename std::enable_if::type parse_in_arena( substr yaml ); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_place(csubstr filename, substr yaml, Tree *t, size_t node_id); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_place( substr yaml, Tree *t, size_t node_id); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_place(csubstr filename, substr yaml, Tree *t ); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_place( substr yaml, Tree *t ); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_place(csubstr filename, substr yaml, NodeRef node ); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_place( substr yaml, NodeRef node ); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_place(csubstr filename, substr yaml ); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_place( substr yaml ); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_arena(csubstr filename, csubstr yaml, Tree *t, size_t node_id); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_arena( csubstr yaml, Tree *t, size_t node_id); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_arena(csubstr filename, csubstr yaml, Tree *t ); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_arena( csubstr yaml, Tree *t ); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_arena(csubstr filename, csubstr yaml, NodeRef node ); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_arena( csubstr yaml, NodeRef node ); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_arena(csubstr filename, csubstr yaml ); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding function in parse.hpp.") typename std::enable_if::type parse_in_arena( csubstr yaml ); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding csubstr version in parse.hpp.") typename std::enable_if::type parse_in_arena(csubstr filename, substr yaml, Tree *t, size_t node_id); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding csubstr version in parse.hpp.") typename std::enable_if::type parse_in_arena( substr yaml, Tree *t, size_t node_id); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding csubstr version in parse.hpp.") typename std::enable_if::type parse_in_arena(csubstr filename, substr yaml, Tree *t ); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding csubstr version in parse.hpp.") typename std::enable_if::type parse_in_arena( substr yaml, Tree *t ); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding csubstr version in parse.hpp.") typename std::enable_if::type parse_in_arena(csubstr filename, substr yaml, NodeRef node ); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding csubstr version in parse.hpp.") typename std::enable_if::type parse_in_arena( substr yaml, NodeRef node ); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding csubstr version in parse.hpp.") typename std::enable_if::type parse_in_arena(csubstr filename, substr yaml ); + template RYML_DEPRECATED("removed, deliberately undefined. use the freestanding csubstr version in parse.hpp.") typename std::enable_if::type parse_in_arena( substr yaml ); /** @endcond */ /** @} */ @@ -460,14 +460,14 @@ class ParseEngine /** @{*/ /** filter a plain scalar */ - FilterResult filter_scalar_plain(csubstr scalar, substr dst, size_t indentation) noexcept; + FilterResult filter_scalar_plain(csubstr scalar, substr dst, size_t indentation); /** filter a plain scalar in place */ - FilterResult filter_scalar_plain_in_place(substr scalar, size_t cap, size_t indentation) noexcept; + FilterResult filter_scalar_plain_in_place(substr scalar, size_t cap, size_t indentation); /** filter a single-quoted scalar */ - FilterResult filter_scalar_squoted(csubstr scalar, substr dst) noexcept; + FilterResult filter_scalar_squoted(csubstr scalar, substr dst); /** filter a single-quoted scalar in place */ - FilterResult filter_scalar_squoted_in_place(substr scalar, size_t cap) noexcept; + FilterResult filter_scalar_squoted_in_place(substr scalar, size_t cap); /** filter a double-quoted scalar */ FilterResult filter_scalar_dquoted(csubstr scalar, substr dst); @@ -475,14 +475,14 @@ class ParseEngine FilterResultExtending filter_scalar_dquoted_in_place(substr scalar, size_t cap); /** filter a block-literal scalar */ - FilterResult filter_scalar_block_literal(csubstr scalar, substr dst, size_t indentation, BlockChomp_e chomp) noexcept; + FilterResult filter_scalar_block_literal(csubstr scalar, substr dst, size_t indentation, BlockChomp_e chomp); /** filter a block-literal scalar in place */ - FilterResult filter_scalar_block_literal_in_place(substr scalar, size_t cap, size_t indentation, BlockChomp_e chomp) noexcept; + FilterResult filter_scalar_block_literal_in_place(substr scalar, size_t cap, size_t indentation, BlockChomp_e chomp); /** filter a block-folded scalar */ - FilterResult filter_scalar_block_folded(csubstr scalar, substr dst, size_t indentation, BlockChomp_e chomp) noexcept; + FilterResult filter_scalar_block_folded(csubstr scalar, substr dst, size_t indentation, BlockChomp_e chomp); /** filter a block-folded scalar in place */ - FilterResult filter_scalar_block_folded_in_place(substr scalar, size_t cap, size_t indentation, BlockChomp_e chomp) noexcept; + FilterResult filter_scalar_block_folded_in_place(substr scalar, size_t cap, size_t indentation, BlockChomp_e chomp); /** @} */ @@ -598,34 +598,35 @@ class ParseEngine public: /** @cond dev */ - template auto _filter_plain(FilterProcessor &C4_RESTRICT proc, size_t indentation) noexcept -> decltype(proc.result()); - template auto _filter_squoted(FilterProcessor &C4_RESTRICT proc) noexcept -> decltype(proc.result()); + template auto _filter_plain(FilterProcessor &C4_RESTRICT proc, size_t indentation) -> decltype(proc.result()); + template auto _filter_squoted(FilterProcessor &C4_RESTRICT proc) -> decltype(proc.result()); template auto _filter_dquoted(FilterProcessor &C4_RESTRICT proc) -> decltype(proc.result()); - template auto _filter_block_literal(FilterProcessor &C4_RESTRICT proc, size_t indentation, BlockChomp_e chomp) noexcept -> decltype(proc.result()); - template auto _filter_block_folded(FilterProcessor &C4_RESTRICT proc, size_t indentation, BlockChomp_e chomp) noexcept -> decltype(proc.result()); + template auto _filter_block_literal(FilterProcessor &C4_RESTRICT proc, size_t indentation, BlockChomp_e chomp) -> decltype(proc.result()); + template auto _filter_block_folded(FilterProcessor &C4_RESTRICT proc, size_t indentation, BlockChomp_e chomp) -> decltype(proc.result()); /** @endcond */ public: /** @cond dev */ - template void _filter_nl_plain(FilterProcessor &C4_RESTRICT proc, size_t indentation) noexcept; - template void _filter_nl_squoted(FilterProcessor &C4_RESTRICT proc) noexcept; - template void _filter_nl_dquoted(FilterProcessor &C4_RESTRICT proc) noexcept; + template void _filter_nl_plain(FilterProcessor &C4_RESTRICT proc, size_t indentation); + template void _filter_nl_squoted(FilterProcessor &C4_RESTRICT proc); + template void _filter_nl_dquoted(FilterProcessor &C4_RESTRICT proc); - template bool _filter_ws_handle_to_first_non_space(FilterProcessor &C4_RESTRICT proc) noexcept; - template void _filter_ws_copy_trailing(FilterProcessor &C4_RESTRICT proc) noexcept; - template void _filter_ws_skip_trailing(FilterProcessor &C4_RESTRICT proc) noexcept; + template bool _filter_ws_handle_to_first_non_space(FilterProcessor &C4_RESTRICT proc); + template void _filter_ws_copy_trailing(FilterProcessor &C4_RESTRICT proc); + template void _filter_ws_skip_trailing(FilterProcessor &C4_RESTRICT proc); template void _filter_dquoted_backslash(FilterProcessor &C4_RESTRICT proc); - template void _filter_chomp(FilterProcessor &C4_RESTRICT proc, BlockChomp_e chomp, size_t indentation) noexcept; - template size_t _handle_all_whitespace(FilterProcessor &C4_RESTRICT proc, BlockChomp_e chomp) noexcept; - template size_t _extend_to_chomp(FilterProcessor &C4_RESTRICT proc, size_t contents_len) noexcept; - template void _filter_block_indentation(FilterProcessor &C4_RESTRICT proc, size_t indentation) noexcept; - template void _filter_block_folded_newlines(FilterProcessor &C4_RESTRICT proc, size_t indentation, size_t len) noexcept; - template size_t _filter_block_folded_newlines_compress(FilterProcessor &C4_RESTRICT proc, size_t num_newl, size_t wpos_at_first_newl) noexcept; - template void _filter_block_folded_newlines_leading(FilterProcessor &C4_RESTRICT proc, size_t indentation, size_t len) noexcept; + template void _filter_chomp(FilterProcessor &C4_RESTRICT proc, BlockChomp_e chomp, size_t indentation); + template size_t _handle_all_whitespace(FilterProcessor &C4_RESTRICT proc, BlockChomp_e chomp); + template size_t _extend_to_chomp(FilterProcessor &C4_RESTRICT proc, size_t contents_len); + template void _filter_block_indentation(FilterProcessor &C4_RESTRICT proc, size_t indentation); + template void _filter_block_folded_newlines(FilterProcessor &C4_RESTRICT proc, size_t indentation, size_t len); + template size_t _filter_block_folded_newlines_compress(FilterProcessor &C4_RESTRICT proc, size_t num_newl, size_t wpos_at_first_newl); + template void _filter_block_folded_newlines_leading(FilterProcessor &C4_RESTRICT proc, size_t indentation, size_t len); template void _filter_block_folded_indented_block(FilterProcessor &C4_RESTRICT proc, size_t indentation, size_t len, size_t curr_indentation) noexcept; + /** @endcond */ private: diff --git a/src/c4/yml/parser_state.hpp b/src/c4/yml/parser_state.hpp index 9072f2a6..2c9ec678 100644 --- a/src/c4/yml/parser_state.hpp +++ b/src/c4/yml/parser_state.hpp @@ -11,12 +11,6 @@ namespace yml { /** data type for @ref ParserState_e */ using ParserFlag_t = int; -#ifdef RYML_DBG -namespace detail { -csubstr _parser_flags_to_str(substr buf, ParserFlag_t flags); -} // namespace -#endif - /** Enumeration of the state flags for the parser */ typedef enum : ParserFlag_t { RTOP = 0x01 << 0, ///< reading at top level @@ -42,6 +36,14 @@ typedef enum : ParserFlag_t { RSEQIMAP = 0x01 << 17, } ParserState_e; +#ifdef RYML_DBG +/** @cond dev */ +namespace detail { +csubstr _parser_flags_to_str(substr buf, ParserFlag_t flags); +} // namespace +/** @endcond */ +#endif + /** Helper to control the line contents while parsing a buffer */ struct LineContents