Lines Matching defs:tokens
9 jsmntok_t *tokens, size_t num_tokens) {
14 tok = &tokens[parser->toknext++];
38 size_t len, jsmntok_t *tokens, size_t num_tokens) {
66 if (tokens == NULL) {
70 token = jsmn_alloc_token(parser, tokens, num_tokens);
87 size_t len, jsmntok_t *tokens, size_t num_tokens) {
100 if (tokens == NULL) {
103 token = jsmn_alloc_token(parser, tokens, num_tokens);
151 * Parse JSON string and fill tokens.
154 jsmntok_t *tokens, unsigned int num_tokens) {
168 if (tokens == NULL) {
171 token = jsmn_alloc_token(parser, tokens, num_tokens);
175 tokens[parser->toksuper].size++;
185 if (tokens == NULL)
192 token = &tokens[parser->toknext - 1];
205 token = &tokens[token->parent];
209 token = &tokens[i];
222 token = &tokens[i];
231 r = jsmn_parse_string(parser, js, len, tokens, num_tokens);
234 if (parser->toksuper != -1 && tokens != NULL)
235 tokens[parser->toksuper].size++;
243 if (tokens != NULL &&
244 tokens[parser->toksuper].type != JSMN_ARRAY &&
245 tokens[parser->toksuper].type != JSMN_OBJECT) {
247 parser->toksuper = tokens[parser->toksuper].parent;
250 if (tokens[i].type == JSMN_ARRAY || tokens[i].type == JSMN_OBJECT) {
251 if (tokens[i].start != -1 && tokens[i].end == -1) {
266 if (tokens != NULL) {
267 jsmntok_t *t = &tokens[parser->toksuper];
277 r = jsmn_parse_primitive(parser, js, len, tokens, num_tokens);
280 if (parser->toksuper != -1 && tokens != NULL)
281 tokens[parser->toksuper].size++;
291 if (tokens != NULL) {
294 if (tokens[i].start != -1 && tokens[i].end == -1) {
304 * Creates a new parser based over a given buffer with an array of tokens