mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
Added --filename-suffix and --filename-ext to flatc (#5778)
* Fixed refractoring issue in reflection/generate_code.sh. Also, mv deletes the original file, so I don't need to clean it up manually in that case. * Added --filename-suffix and --filename-ext to flatc * Fixed typo and added example generation of suffix and extension for C++ * Removed extra ; * Removed clang-format block from a region that didn't need it. Fixed an auto format of another clang-format block * Added docs, fixed pointer alignment, removed suffix test file
This commit is contained in:
@@ -30,7 +30,9 @@ static void Error(const flatbuffers::FlatCompiler *flatc,
|
||||
const std::string &err, bool usage, bool show_exe_name) {
|
||||
if (show_exe_name) { printf("%s: ", g_program_name); }
|
||||
printf("error: %s\n", err.c_str());
|
||||
if (usage && flatc) { printf("%s", flatc->GetUsageString(g_program_name).c_str()); }
|
||||
if (usage && flatc) {
|
||||
printf("%s", flatc->GetUsageString(g_program_name).c_str());
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -105,8 +107,8 @@ int main(int argc, const char *argv[]) {
|
||||
{ flatbuffers::GenerateJsonSchema, nullptr, "--jsonschema", "JsonSchema",
|
||||
true, nullptr, flatbuffers::IDLOptions::kJsonSchema,
|
||||
"Generate Json schema", nullptr },
|
||||
{ flatbuffers::GenerateSwift, nullptr, "--swift", "swift",
|
||||
true, flatbuffers::GenerateSwiftGRPC, flatbuffers::IDLOptions::kSwift,
|
||||
{ flatbuffers::GenerateSwift, nullptr, "--swift", "swift", true,
|
||||
flatbuffers::GenerateSwiftGRPC, flatbuffers::IDLOptions::kSwift,
|
||||
"Generate Swift files for tables/structs", nullptr },
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user