Template
|
detail::lexer< BasicJsonType, InputAdapterType > Class Template Reference
lexical analysis More...
#include <json.hpp>
Inherits detail::lexer_base< BasicJsonType >.
Public Types | |
using | token_type = typename lexer_base< BasicJsonType >::token_type |
Public Types inherited from detail::lexer_base< BasicJsonType > | |
enum class | token_type { uninitialized , literal_true , literal_false , literal_null , value_string , value_unsigned , value_integer , value_float , begin_array , begin_object , end_array , end_object , name_separator , value_separator , parse_error , end_of_input , literal_or_value } |
token types for the parser More... | |
Public Member Functions | |
lexer (InputAdapterType &&adapter, bool ignore_comments_=false) noexcept | |
lexer (const lexer &)=delete | |
lexer (lexer &&)=default | |
lexer & | operator= (lexer &)=delete |
lexer & | operator= (lexer &&)=default |
~lexer ()=default | |
constexpr number_integer_t | get_number_integer () const noexcept |
return integer value | |
constexpr number_unsigned_t | get_number_unsigned () const noexcept |
return unsigned integer value | |
constexpr number_float_t | get_number_float () const noexcept |
return floating-point value | |
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 | |
std::string | get_token_string () const |
JSON_HEDLEY_RETURNS_NON_NULL constexpr const char * | get_error_message () const noexcept |
return syntax error message | |
bool | skip_bom () |
skip the UTF-8 byte order mark | |
void | skip_whitespace () |
token_type | scan () |
Additional Inherited Members | |
Static Public Member Functions inherited from detail::lexer_base< BasicJsonType > | |
JSON_HEDLEY_RETURNS_NON_NULL static JSON_HEDLEY_CONST const char * | token_type_name (const token_type t) noexcept |
return name of values of type token_type (only used for errors) | |
Detailed Description
template<typename BasicJsonType, typename InputAdapterType>
class detail::lexer< BasicJsonType, InputAdapterType >
class detail::lexer< BasicJsonType, InputAdapterType >
lexical analysis
This class organizes the lexical analysis during JSON deserialization.
Member Typedef Documentation
◆ token_type
template<typename BasicJsonType , typename InputAdapterType >
using detail::lexer< BasicJsonType, InputAdapterType >::token_type = typename lexer_base<BasicJsonType>::token_type |
Constructor & Destructor Documentation
◆ lexer() [1/3]
template<typename BasicJsonType , typename InputAdapterType >
|
inlineexplicitnoexcept |
◆ lexer() [2/3]
template<typename BasicJsonType , typename InputAdapterType >
|
delete |
◆ lexer() [3/3]
template<typename BasicJsonType , typename InputAdapterType >
|
default |
◆ ~lexer()
template<typename BasicJsonType , typename InputAdapterType >
|
default |
Member Function Documentation
◆ get_error_message()
template<typename BasicJsonType , typename InputAdapterType >
|
inlineconstexprnoexcept |
◆ get_number_float()
template<typename BasicJsonType , typename InputAdapterType >
|
inlineconstexprnoexcept |
◆ get_number_integer()
template<typename BasicJsonType , typename InputAdapterType >
|
inlineconstexprnoexcept |
◆ get_number_unsigned()
template<typename BasicJsonType , typename InputAdapterType >
|
inlineconstexprnoexcept |
◆ get_position()
template<typename BasicJsonType , typename InputAdapterType >
|
inlineconstexprnoexcept |
◆ get_string()
template<typename BasicJsonType , typename InputAdapterType >
|
inline |
◆ get_token_string()
template<typename BasicJsonType , typename InputAdapterType >
|
inline |
◆ operator=() [1/2]
template<typename BasicJsonType , typename InputAdapterType >
|
default |
◆ operator=() [2/2]
template<typename BasicJsonType , typename InputAdapterType >
|
delete |
◆ scan()
template<typename BasicJsonType , typename InputAdapterType >
|
inline |
◆ skip_bom()
template<typename BasicJsonType , typename InputAdapterType >
|
inline |
◆ skip_whitespace()
template<typename BasicJsonType , typename InputAdapterType >
|
inline |
The documentation for this class was generated from the following file:
- include/nlohmann/json.hpp
Generated by 1.9.8