Fixed incorrect verifier code for nested tables.

It was outputting the type instead of the field name, and didn't deal
with NULL fields. Added test case.

Also fixed token enums having the wrong value, resulting in
unreadable error messages.

Change-Id: Icd9b4d22f417bfad5824c0f58e067ce3f2e2dc6f
Tested: on Windows and Linux.
This commit is contained in:
Wouter van Oortmerssen
2014-07-09 11:44:26 -07:00
parent b3ee52c0a7
commit 75349ae8c3
8 changed files with 25 additions and 11 deletions

View File

@@ -83,7 +83,7 @@ template<> inline Offset<void> atot<Offset<void>>(const char *s) {
TD(NameSpace, 265, "namespace") \
TD(RootType, 266, "root_type")
enum {
#define FLATBUFFERS_TOKEN(NAME, VALUE, STRING) kToken ## NAME,
#define FLATBUFFERS_TOKEN(NAME, VALUE, STRING) kToken ## NAME = VALUE,
FLATBUFFERS_GEN_TOKENS(FLATBUFFERS_TOKEN)
#undef FLATBUFFERS_TOKEN
#define FLATBUFFERS_TD(ENUM, IDLTYPE, CTYPE, JTYPE) kToken ## ENUM,