Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (24 sloc) 0.728 kb
#ifndef JSON_TOKENIZER_HPP_INCLUDED
#define JSON_TOKENIZER_HPP_INCLUDED
namespace json {
struct TokenizerError {
const char* msg;
const char* loc;
};
struct Token {
Token() : translate(false) {}
enum TYPE { TYPE_NUMBER, TYPE_STRING, TYPE_LCURLY, TYPE_RCURLY,
TYPE_LSQUARE, TYPE_RSQUARE, TYPE_COMMA, TYPE_COLON,
TYPE_TRUE_VALUE, TYPE_FALSE_VALUE, TYPE_NULL_VALUE,
TYPE_IDENTIFIER,
NUM_TYPES };
TYPE type;
const char* begin, *end;
bool translate;
};
Token get_token(const char*& i1, const char* i2);
//Gets the full token, unlike get_token which will e.g. return the
//characters inside the string.
Token get_token_full(const char*& i1, const char* i2);
}
#endif
Jump to Line
Something went wrong with that request. Please try again.