The list of enum values is now allowed to end in a comma.

Bug: 16490424
Change-Id: Ic3dd5f06efb5cf2dc4aefbd3f2db64c7b59b6b93
Tested: on OS X.
This commit is contained in:
Wouter van Oortmerssen
2014-08-21 15:17:45 -07:00
parent 541b06759f
commit c553b6b950
2 changed files with 2 additions and 2 deletions

View File

@@ -725,7 +725,7 @@ void Parser::ParseEnum(bool is_union) {
if (prevsize && enum_def.vals.vec[prevsize - 1]->value >= ev.value)
Error("enum values must be specified in ascending order");
}
} while (IsNext(','));
} while (IsNext(',') && token_ != '}');
Expect('}');
if (enum_def.attributes.Lookup("bit_flags")) {
for (auto it = enum_def.vals.vec.begin(); it != enum_def.vals.vec.end();