aboutsummaryrefslogtreecommitdiff
path: root/qobject/json-parser-int.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2018-08-31 09:58:40 +0200
committerMarkus Armbruster <armbru@redhat.com>2018-09-24 18:08:07 +0200
commit2ce4ee64c4fe0463c53a99955a3acdaa8a451136 (patch)
tree388a1c565c000192b6ab4b07ff521a69acc4103e /qobject/json-parser-int.h
parent0f07a5d5f1f484c9c334d52193617e89442da7c9 (diff)
json: Eliminate lexer state IN_ERROR
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20180831075841.13363-6-armbru@redhat.com>
Diffstat (limited to 'qobject/json-parser-int.h')
-rw-r--r--qobject/json-parser-int.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/qobject/json-parser-int.h b/qobject/json-parser-int.h
index abeec63af5..57cb8e79d3 100644
--- a/qobject/json-parser-int.h
+++ b/qobject/json-parser-int.h
@@ -16,10 +16,11 @@
#include "qapi/qmp/json-parser.h"
-
typedef enum json_token_type {
- JSON_MIN = 100,
- JSON_LCURLY = JSON_MIN,
+ JSON_ERROR = 0, /* must be zero, see json_lexer[] */
+ /* Gap for lexer states */
+ JSON_LCURLY = 100,
+ JSON_MIN = JSON_LCURLY,
JSON_RCURLY,
JSON_LSQUARE,
JSON_RSQUARE,
@@ -31,7 +32,6 @@ typedef enum json_token_type {
JSON_STRING,
JSON_INTERP,
JSON_SKIP,
- JSON_ERROR,
JSON_END_OF_INPUT,
JSON_MAX = JSON_END_OF_INPUT
} JSONTokenType;