From c54616608af442edf4cfb7397a1909c2653efba0 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 25 Nov 2015 22:23:26 +0100 Subject: qjson: Give each of the six structural chars its own token type Simplifies things, because we always check for a specific one. Signed-off-by: Markus Armbruster Message-Id: <1448486613-17634-6-git-send-email-armbru@redhat.com> Reviewed-by: Eric Blake --- include/qapi/qmp/json-lexer.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/qapi/qmp') diff --git a/include/qapi/qmp/json-lexer.h b/include/qapi/qmp/json-lexer.h index 61a143f5bf..f3e8dc71bf 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, + JSON_COLON, + JSON_COMMA, JSON_INTEGER, JSON_FLOAT, JSON_KEYWORD, -- cgit v1.2.3