MCPcopy Create free account
hub / github.com/boostorg/json / resume_value

Method resume_value

include/boost/json/basic_parser_impl.hpp:714–786  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

712 bool AllowTrailing_,
713 bool AllowBadUTF8_*/>
714const char*
715basic_parser<Handler>::
716resume_value(const char* p,
717 std::integral_constant<bool, AllowComments_> allow_comments,
718 /*std::integral_constant<bool, AllowTrailing_>*/ bool allow_trailing,
719 /*std::integral_constant<bool, AllowBadUTF8_>*/ bool allow_bad_utf8,
720 bool allow_bad_utf16)
721{
722 state st;
723 st_.peek(st);
724 switch(st)
725 {
726 default: BOOST_JSON_UNREACHABLE();
727 case state::lit1:
728 return parse_literal(p, detail::literals_c<detail::literals::resume>() );
729
730 case state::str1: case state::str2:
731 case state::str8:
732 return parse_string(p, std::false_type(), std::false_type(), allow_bad_utf8, allow_bad_utf16);
733
734 case state::arr1: case state::arr2:
735 case state::arr3: case state::arr4:
736 case state::arr5: case state::arr6:
737 return parse_array(p, std::false_type(), allow_comments, allow_trailing, allow_bad_utf8, allow_bad_utf16);
738
739 case state::obj1: case state::obj2:
740 case state::obj3: case state::obj4:
741 case state::obj5: case state::obj6:
742 case state::obj7: case state::obj8:
743 case state::obj9: case state::obj10:
744 case state::obj11:
745 return parse_object(p, std::false_type(), allow_comments, allow_trailing, allow_bad_utf8, allow_bad_utf16);
746
747 case state::num1: case state::num2:
748 case state::num3: case state::num4:
749 case state::num5: case state::num6:
750 case state::num7: case state::num8:
751 case state::exp1: case state::exp2:
752 case state::exp3:
753 return mp11::mp_with_index<3>(
754 static_cast<unsigned char>(opt_.numbers),
755 parse_number_helper<false, 0>{ this, p });
756
757 // KRYSTIAN NOTE: these are special cases
758 case state::val1:
759 {
760 st_.pop(st);
761 BOOST_ASSERT(st_.empty());
762 p = detail::count_whitespace(p, end_);
763 if(BOOST_JSON_UNLIKELY(p == end_))
764 return maybe_suspend(p, state::val1);
765 return parse_value(p, std::true_type(), allow_comments, allow_trailing, allow_bad_utf8, allow_bad_utf16);
766 }
767
768 case state::val2:
769 {
770 st_.pop(st);
771 p = parse_comment(p, std::false_type(), std::false_type());

Callers

nothing calls this directly

Calls 4

count_whitespaceFunction · 0.85
parse_valueFunction · 0.85
popMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected