X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=ucw-json%2Fparse.c;h=df99ea405196efad68538da24d28ad15073170cc;hb=HEAD;hp=96c916f3c205fdac71738637ad89642013d5d943;hpb=0f71e145c12d6ea556a393a49a7fb8aef296cf6e;p=libucw.git diff --git a/ucw-json/parse.c b/ucw-json/parse.c index 96c916f3..df99ea40 100644 --- a/ucw-json/parse.c +++ b/ucw-json/parse.c @@ -25,13 +25,11 @@ void json_set_input(struct json_context *js, struct fastbuf *in) js->next_char = -1; js->next_token = NULL; js->in_eof = 0; - if (!js->trivial_token) - js->trivial_token = json_new_node(js, JSON_INVALID); } static void NONRET json_parse_error(struct json_context *js, const char *msg) { - trans_throw("ucw.js.parse", js, "%s at line %u:%u", msg, js->in_line, js->in_column); + trans_throw("ucw.json.parse", js, "%s at line %u:%u", msg, js->in_line, js->in_column); } static int json_get_char(struct json_context *js) @@ -42,7 +40,6 @@ static int json_get_char(struct json_context *js) if (c == -2) json_parse_error(js, "Malformed UTF-8 character"); js->in_eof = 1; - // FIXME: Reject alternative sequences return c; } js->in_column++;