mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 12:05:50 +00:00
Optionally generate type prefixes and suffixes for python code (#7857)
* optionally generate type prefixes and suffixes for python code * fix codegen error when qualified name is empty * generated code updated
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" },
|
||||
{ "", "python-no-type-prefix-suffix", "",
|
||||
"Skip emission of Python functions that are prefixed with typenames" },
|
||||
{ "", "file-names-only", "",
|
||||
"Print out generated file names without writing to the files"},
|
||||
};
|
||||
@@ -650,7 +652,9 @@ FlatCOptions FlatCompiler::ParseFromCommandLineArguments(int argc,
|
||||
opts.ts_no_import_ext = true;
|
||||
} else if (arg == "--no-leak-private-annotation") {
|
||||
opts.no_leak_private_annotations = true;
|
||||
} else if (arg == "--annotate-sparse-vectors") {
|
||||
} else if (arg == "--python-no-type-prefix-suffix") {
|
||||
opts.python_no_type_prefix_suffix = true;
|
||||
} else if (arg == "--annotate-sparse-vectors") {
|
||||
options.annotate_include_vector_contents = false;
|
||||
} else if (arg == "--annotate") {
|
||||
if (++argi >= argc) Error("missing path following: " + arg, true);
|
||||
|
||||
Reference in New Issue
Block a user