Made the parser not have any hard-coded keywords.

This prevented any keywords showing up as JSON field names, for example.

Change-Id: Ie9d0cada96778e06016ca02ca96d052410a37038
Tested: on Linux.
This commit is contained in:
Wouter van Oortmerssen
2017-09-22 14:32:07 -07:00
parent 72a99abfb7
commit 03e2899985
8 changed files with 154 additions and 217 deletions

View File

@@ -580,7 +580,7 @@ static std::string GenMethod(const FieldDef &field) {
static std::string GenTypeBasic(const Type &type) {
static const char *ctypename[] = {
#define FLATBUFFERS_TD(ENUM, IDLTYPE, ALIASTYPE, \
#define FLATBUFFERS_TD(ENUM, IDLTYPE, \
CTYPE, JTYPE, GTYPE, NTYPE, PTYPE) \
#PTYPE,
FLATBUFFERS_GEN_TYPES(FLATBUFFERS_TD)