8826 std::vector<bool> states;
8828 bool skip_to_state_evaluation =
false;
8832 if (not skip_to_state_evaluation)
8837 case token_type::begin_object:
8845 if (
get_token() == token_type::end_object)
8877 states.push_back(
false);
8884 case token_type::begin_array:
8892 if (
get_token() == token_type::end_array)
8902 states.push_back(
true);
8908 case token_type::value_float:
8927 case token_type::literal_false:
8936 case token_type::literal_null:
8945 case token_type::literal_true:
8954 case token_type::value_integer:
8963 case token_type::value_string:
8972 case token_type::value_unsigned:
8981 case token_type::parse_error:
9001 skip_to_state_evaluation =
false;
9014 if (
get_token() == token_type::value_separator)
9033 assert(not states.empty());
9035 skip_to_state_evaluation =
true;
9047 if (
get_token() == token_type::value_separator)
9089 assert(not states.empty());
9091 skip_to_state_evaluation =
true;
constexpr number_unsigned_t get_number_unsigned() const noexcept
return unsigned integer value
token_type get_token()
get next token from lexer
string_t & get_string()
return current string value (implicitly resets the token; useful only once)
constexpr position_t get_position() const noexcept
return position of last read token
constexpr number_integer_t get_number_integer() const noexcept
return integer value
constexpr number_float_t get_number_float() const noexcept
return floating-point value
bool isfinite(Vector const &v)
Returns whether all components of the vector are finite.
#define JSON_HEDLEY_LIKELY(expr)
token_type last_token
the type of the last read token
static out_of_range create(int id_, const std::string &what_arg)
#define JSON_HEDLEY_UNLIKELY(expr)
std::string exception_message(const token_type expected, const std::string &context)
std::string get_token_string() const
static parse_error create(int id_, const position_t &pos, const std::string &what_arg)
create a parse error exception