Lines Matching defs:ctxt
41 static QObject *parse_value(JSONParserContext *ctxt, QList **tokens, va_list *ap);
94 static void GCC_FMT_ATTR(3, 4) parse_error(JSONParserContext *ctxt,
169 static QString *qstring_from_escaped_str(JSONParserContext *ctxt, QObject *token)
236 parse_error(ctxt, token,
247 parse_error(ctxt, token, "invalid escape sequence in string");
270 static int parse_pair(JSONParserContext *ctxt, QDict *dict, QList **tokens, va_list *ap)
276 key = parse_value(ctxt, &working, ap);
278 parse_error(ctxt, peek, "key is not a string in object");
284 parse_error(ctxt, token, "missing : in object pair");
288 value = parse_value(ctxt, &working, ap);
290 parse_error(ctxt, token, "Missing value in dict");
311 static QObject *parse_object(JSONParserContext *ctxt, QList **tokens, va_list *ap)
328 if (parse_pair(ctxt, dict, &working, ap) == -1) {
335 parse_error(ctxt, token, "expected separator in dict");
341 if (parse_pair(ctxt, dict, &working, ap) == -1) {
367 static QObject *parse_array(JSONParserContext *ctxt, QList **tokens, va_list *ap)
386 obj = parse_value(ctxt, &working, ap);
388 parse_error(ctxt, token, "expecting value");
397 parse_error(ctxt, token, "expected separator in list");
404 obj = parse_value(ctxt, &working, ap);
406 parse_error(ctxt, token, "expecting value");
435 static QObject *parse_keyword(JSONParserContext *ctxt, QList **tokens)
451 parse_error(ctxt, token, "invalid keyword `%s'", token_get_value(token));
468 static QObject *parse_escape(JSONParserContext *ctxt, QList **tokens, va_list *ap)
511 static QObject *parse_literal(JSONParserContext *ctxt, QList **tokens)
519 obj = QOBJECT(qstring_from_escaped_str(ctxt, token));
545 static QObject *parse_value(JSONParserContext *ctxt, QList **tokens, va_list *ap)
549 obj = parse_object(ctxt, tokens, ap);
551 obj = parse_array(ctxt, tokens, ap);
554 obj = parse_escape(ctxt, tokens, ap);
557 obj = parse_keyword(ctxt, tokens);
560 obj = parse_literal(ctxt, tokens);
568 JSONParserContext ctxt = {};
572 result = parse_value(&ctxt, &working, ap);