summaryrefslogtreecommitdiff
path: root/src/flatc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/flatc.cpp')
-rw-r--r--src/flatc.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/flatc.cpp b/src/flatc.cpp
index 405cc6d5..abc948c2 100644
--- a/src/flatc.cpp
+++ b/src/flatc.cpp
@@ -111,6 +111,8 @@ std::string FlatCompiler::GetUsageString(const char* program_name) const {
" --keep-prefix Keep original prefix of schema include statement.\n"
" --no-fb-import Don't include flatbuffers import statement for TypeScript.\n"
" --no-ts-reexport Don't re-export imported dependencies for TypeScript.\n"
+ " --reflect-types Add minimal type reflection to code generation.\n"
+ " --reflect-names Add minimal type/name reflection.\n"
"FILEs may be schemas (must end in .fbs), or JSON files (conforming to preceding\n"
"schema). FILEs after the -- must be binary flatbuffer format files.\n"
"Output files are named using the base file name of the input,\n"
@@ -243,6 +245,10 @@ int FlatCompiler::Compile(int argc, const char** argv) {
opts.skip_flatbuffers_import = true;
} else if(arg == "--no-ts-reexport") {
opts.reexport_ts_modules = false;
+ } else if(arg == "--reflect-types") {
+ opts.mini_reflect = IDLOptions::kTypes;
+ } else if(arg == "--reflect-names") {
+ opts.mini_reflect = IDLOptions::kTypesAndNames;
} else {
for (size_t i = 0; i < params_.num_generators; ++i) {
if (arg == params_.generators[i].generator_opt_long ||