Xonotic
|
#include "test.qh"
Go to the source code of this file.
Macros | |
#define | JSON_BEGIN() int __i = STRING_ITERATOR_SAVE(_json) |
#define | JSON_END() |
#define | JSON_FAIL(reason) goto fail |
Functions | |
bool | _json_parse_array () |
bool | _json_parse_false () |
bool | _json_parse_float () |
bool | _json_parse_int () |
bool | _json_parse_members () |
bool | _json_parse_null () |
bool | _json_parse_number () |
bool | _json_parse_object () |
parse a json object More... | |
bool | _json_parse_pair () |
bool | _json_parse_string (bool add) |
bool | _json_parse_true () |
bool | _json_parse_value () |
ERASEABLE void | json_del (int buf) |
ERASEABLE void | json_dump (int buf) |
ERASEABLE string | json_get (int buf, string key) |
ERASEABLE int | json_parse (string in, bool() func) |
STRING_ITERATOR (_json, string_null, 0) | |
TEST (json, Parse) | |
Variables | |
int | _json_buffer |
int | _json_keys |
string | _json_ns |
string | _json_temp |
#define JSON_BEGIN | ( | ) | int __i = STRING_ITERATOR_SAVE(_json) |
Definition at line 23 of file json.qc.
Referenced by _json_parse_array(), _json_parse_false(), _json_parse_float(), _json_parse_int(), _json_parse_members(), _json_parse_null(), _json_parse_number(), _json_parse_object(), _json_parse_pair(), _json_parse_string(), _json_parse_true(), and _json_parse_value().
#define JSON_END | ( | ) |
Definition at line 25 of file json.qc.
Referenced by _json_parse_array(), _json_parse_false(), _json_parse_float(), _json_parse_int(), _json_parse_members(), _json_parse_null(), _json_parse_number(), _json_parse_object(), _json_parse_pair(), _json_parse_string(), _json_parse_true(), and _json_parse_value().
#define JSON_FAIL | ( | reason | ) | goto fail |
Definition at line 24 of file json.qc.
Referenced by _json_parse_array(), _json_parse_false(), _json_parse_float(), _json_parse_int(), _json_parse_members(), _json_parse_null(), _json_parse_number(), _json_parse_object(), _json_parse_pair(), _json_parse_string(), _json_parse_true(), and _json_parse_value().
Definition at line 73 of file json.qc.
References _json_buffer, _json_ns, _json_parse_value(), ERASEABLE, ftos(), JSON_BEGIN, JSON_END, JSON_FAIL, strcat(), STRING_ITERATOR_GET, STRING_ITERATOR_NEXT, STRING_ITERATOR_PEEK, and WITH.
Referenced by _json_parse_value().
Definition at line 126 of file json.qc.
References _json_buffer, ERASEABLE, JSON_BEGIN, JSON_END, JSON_FAIL, and STRING_ITERATOR_GET.
Referenced by _json_parse_value().
Definition at line 190 of file json.qc.
References _json_buffer, chr2str, ERASEABLE, JSON_BEGIN, JSON_END, JSON_FAIL, strcat(), STRING_ITERATOR_GET, and STRING_ITERATOR_UNGET.
Referenced by _json_parse_number().
Definition at line 212 of file json.qc.
References _json_buffer, chr2str, ERASEABLE, ftos(), JSON_BEGIN, JSON_END, JSON_FAIL, stof(), strcat(), STRING_ITERATOR_GET, and STRING_ITERATOR_UNGET.
Referenced by _json_parse_number().
Definition at line 45 of file json.qc.
References _json_parse_pair(), ERASEABLE, JSON_BEGIN, JSON_END, JSON_FAIL, STRING_ITERATOR_NEXT, and STRING_ITERATOR_PEEK.
Referenced by _json_parse_object().
Definition at line 139 of file json.qc.
References _json_buffer, ERASEABLE, JSON_BEGIN, JSON_END, JSON_FAIL, and STRING_ITERATOR_GET.
Referenced by _json_parse_value().
Definition at line 183 of file json.qc.
References _json_parse_float(), _json_parse_int(), ERASEABLE, JSON_BEGIN, JSON_END, and JSON_FAIL.
Referenced by _json_parse_value().
parse a json object
Definition at line 36 of file json.qc.
References _json_buffer, _json_keys, _json_parse_members(), ERASEABLE, JSON_BEGIN, JSON_END, JSON_FAIL, STRING_ITERATOR_GET, and WITH.
Referenced by _json_parse_value(), MX_Messages_(), MX_Sync_(), and TEST().
Definition at line 59 of file json.qc.
References _json_buffer, _json_keys, _json_ns, _json_parse_string(), _json_parse_value(), _json_temp, cons(), ERASEABLE, JSON_BEGIN, JSON_END, JSON_FAIL, strcat(), STRING_ITERATOR_GET, and WITH.
Referenced by _json_parse_members().
Definition at line 151 of file json.qc.
References _json_buffer, _json_temp, chr2str, ERASEABLE, JSON_BEGIN, JSON_END, JSON_FAIL, strcat(), STRING_ITERATOR_GET, and STRING_ITERATOR_UNGET.
Referenced by _json_parse_pair(), and _json_parse_value().
Definition at line 114 of file json.qc.
References _json_buffer, ERASEABLE, JSON_BEGIN, JSON_END, JSON_FAIL, and STRING_ITERATOR_GET.
Referenced by _json_parse_value().
Definition at line 101 of file json.qc.
References _json_parse_array(), _json_parse_false(), _json_parse_null(), _json_parse_number(), _json_parse_object(), _json_parse_string(), _json_parse_true(), ERASEABLE, JSON_BEGIN, JSON_END, and JSON_FAIL.
Referenced by _json_parse_array(), and _json_parse_pair().
Definition at line 276 of file json.qc.
References ERASEABLE, and string_null.
Referenced by MX_Handle(), MX_Messages_(), and MX_Sync_().
Definition at line 230 of file json.qc.
References _json_buffer, buf_create, ERASEABLE, LABEL, strcat(), STRING_ITERATOR_SET, strstrofs, and substring().
Referenced by MX_Messages_(), MX_Sync_(), and TEST().
STRING_ITERATOR | ( | _json | , |
string_null | , | ||
0 | |||
) |
TEST | ( | json | , |
Parse | |||
) |
Definition at line 302 of file json.qc.
References _json_parse_object(), EXPECT_NE, json_dump(), json_parse(), print(), and SUCCEED.
int _json_buffer |
Definition at line 5 of file json.qc.
Referenced by _json_parse_array(), _json_parse_false(), _json_parse_float(), _json_parse_int(), _json_parse_null(), _json_parse_object(), _json_parse_pair(), _json_parse_string(), _json_parse_true(), and json_parse().
int _json_keys |
Definition at line 33 of file json.qc.
Referenced by _json_parse_object(), and _json_parse_pair().
string _json_ns |
Definition at line 31 of file json.qc.
Referenced by _json_parse_array(), and _json_parse_pair().
string _json_temp |
Definition at line 7 of file json.qc.
Referenced by _json_parse_pair(), and _json_parse_string().