On 11/25/2015 02:23 PM, Markus Armbruster wrote: > Simplifies things, because we always check for a specific one. > > Signed-off-by: Markus Armbruster <[email protected]> > --- > include/qapi/qmp/json-lexer.h | 7 ++++++- > qobject/json-lexer.c | 19 ++++++++++++------- > qobject/json-parser.c | 31 +++++++++---------------------- > qobject/json-streamer.c | 32 +++++++++++++++----------------- > 4 files changed, 42 insertions(+), 47 deletions(-)
Diffstat shows that it is already a win, even if slight; the real win is
that later patches are easier :)
>
> diff --git a/include/qapi/qmp/json-lexer.h b/include/qapi/qmp/json-lexer.h
> index 61a143f..f3e8dc7 100644
> --- a/include/qapi/qmp/json-lexer.h
> +++ b/include/qapi/qmp/json-lexer.h
> @@ -19,7 +19,12 @@
>
> typedef enum json_token_type {
> JSON_MIN = 100,
> - JSON_OPERATOR = JSON_MIN,
> + JSON_LCURLY = JSON_MIN,
> + JSON_RCURLY,
> + JSON_LSQUARE,
> + JSON_RSQUARE,
I might have used LBRACE and LBRACKET - but I also acknowledge that UK
spellers think of '()' for 'bracket'. Your naming is fine (unless you
really want that bikeshed to be chartreuse).
Reviewed-by: Eric Blake <[email protected]>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
