mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 20:31:23 +00:00
Add a FileWriter interface (#7821)
* Add a FileWriter interface * Change interface * Provide 2 impl for File interface: FileManager & FileNameManager * Update * update * Update * Add file_writer file * Update * Format files * Update based on review * Update * Format bzl file * Add LoadFile function * Format --------- Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
@@ -250,6 +250,8 @@ const static FlatCOption flatc_options[] = {
|
||||
{ "", "no-leak-private-annotation", "",
|
||||
"Prevents multiple type of annotations within a Fbs SCHEMA file. "
|
||||
"Currently this is required to generate private types in Rust" },
|
||||
{ "", "file-names-only", "",
|
||||
"Print out generated file names without writing to the files"},
|
||||
};
|
||||
|
||||
auto cmp = [](FlatCOption a, FlatCOption b) { return a.long_opt < b.long_opt; };
|
||||
@@ -653,6 +655,9 @@ FlatCOptions FlatCompiler::ParseFromCommandLineArguments(int argc,
|
||||
} else if (arg == "--annotate") {
|
||||
if (++argi >= argc) Error("missing path following: " + arg, true);
|
||||
options.annotate_schema = flatbuffers::PosixPath(argv[argi]);
|
||||
} else if(arg == "--file-names-only") {
|
||||
// TODO (khhn): Provide 2 implementation
|
||||
options.file_names_only = true;
|
||||
} else {
|
||||
if (arg == "--proto") { opts.proto_mode = true; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user