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 <armbru@redhat.com>
Message-Id: <1448486613-17634-6-git-send-email-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Markus Armbruster 2015-11-25 22:23:26 +01:00
parent b8d3b1da3c
commit c54616608a
4 changed files with 42 additions and 47 deletions

View file

@ -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,