| 2834 | } |
| 2835 | |
| 2836 | std::shared_ptr<value<bool>> parse_bool(std::string::iterator& it, |
| 2837 | const std::string::iterator& end) |
| 2838 | { |
| 2839 | auto eat = make_consumer(it, end, [this]() { |
| 2840 | throw_parse_exception("Attempted to parse invalid boolean value"); |
| 2841 | }); |
| 2842 | |
| 2843 | if (*it == 't') |
| 2844 | { |
| 2845 | eat("true"); |
| 2846 | return make_value<bool>(true); |
| 2847 | } |
| 2848 | else if (*it == 'f') |
| 2849 | { |
| 2850 | eat("false"); |
| 2851 | return make_value<bool>(false); |
| 2852 | } |
| 2853 | |
| 2854 | eat.error(); |
| 2855 | return nullptr; |
| 2856 | } |
| 2857 | |
| 2858 | std::string::iterator find_end_of_number(std::string::iterator it, |
| 2859 | std::string::iterator end) |
no test coverage detected