mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
Started implementation for private flags in rust (#7269)
Adds flag to the cpp to fix bad annotations in all the languages Addresses comments to the PR, and fixes logic for leaking annotations
This commit is contained in:
@@ -221,6 +221,9 @@ const static FlatCOption options[] = {
|
||||
"Only generated one typescript file per .fbs file." },
|
||||
{ "", "annotate", "SCHEMA",
|
||||
"Annotate the provided BINARY_FILE with the specified SCHEMA file." },
|
||||
{ "", "no-leak-private-annotation", "",
|
||||
"Prevents multiple type of annotations within a Fbs SCHEMA file."
|
||||
"Currently this is required to generate private types in Rust" },
|
||||
};
|
||||
|
||||
static void AppendTextWrappedString(std::stringstream &ss, std::string &text,
|
||||
@@ -596,6 +599,8 @@ int FlatCompiler::Compile(int argc, const char **argv) {
|
||||
opts.json_nested_legacy_flatbuffers = true;
|
||||
} else if (arg == "--ts-flat-files") {
|
||||
opts.ts_flat_file = true;
|
||||
} else if (arg == "--no-leak-private-annotation") {
|
||||
opts.no_leak_private_annotations = true;
|
||||
} else if (arg == "--annotate") {
|
||||
if (++argi >= argc) Error("missing path following: " + arg, true);
|
||||
annotate_schema = flatbuffers::PosixPath(argv[argi]);
|
||||
|
||||
Reference in New Issue
Block a user