mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 04:21:13 +00:00
Implemented the file identifier functionality for Java.
Also fixed flatc not outputting these identifiers for files compiled on the command-line. Bug: 16983987 Change-Id: I8b714cfea3a8e144fa52133f62b2f7eda6eb044a Tested: on Linux
This commit is contained in:
@@ -914,7 +914,8 @@ bool Parser::Parse(const char *source, const char *filepath) {
|
||||
if (builder_.GetSize()) {
|
||||
Error("cannot have more than one json object in a file");
|
||||
}
|
||||
builder_.Finish(Offset<Table>(ParseTable(*root_struct_def)));
|
||||
builder_.Finish(Offset<Table>(ParseTable(*root_struct_def)),
|
||||
file_identifier_.length() ? file_identifier_.c_str() : nullptr);
|
||||
} else if (token_ == kTokenEnum) {
|
||||
ParseEnum(false);
|
||||
} else if (token_ == kTokenUnion) {
|
||||
|
||||
Reference in New Issue
Block a user