On 20/11/2015 19:28, Eric Blake wrote:
>> > +token = parser_context_peek_token(ctxt);
>> > if (token == NULL) {
>> > goto out;
>> > }
>> >
>> > +if (token_get_type(token) != JSON_ESCAPE) {
>> > +goto out;
>> > +}
> Could merge these two conditionals.
Foll
On 11/20/2015 02:04 AM, Paolo Bonzini wrote:
> JSON is LL(1) and our parser indeed needs only 1 token lookahead.
> Saving the parser context is mostly unnecessary; we can replace it
> with peeking at the next token, or remove it altogether when the
> restore only happens on errors. The token list
JSON is LL(1) and our parser indeed needs only 1 token lookahead.
Saving the parser context is mostly unnecessary; we can replace it
with peeking at the next token, or remove it altogether when the
restore only happens on errors. The token list is destroyed anyway
on errors.
The only interesting