mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 20:31:23 +00:00
Add Code Generator for idl_gen_fbs to parse .proto files (#7832)
* Add code generator for proto files * Update * Add --proto to script * Remove cmt * Move proto parsing logic into else block to share same set up logic for code_generator * Remove IsValidCodeGenerator
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "idl_gen_cpp.h"
|
||||
#include "idl_gen_csharp.h"
|
||||
#include "idl_gen_dart.h"
|
||||
#include "idl_gen_fbs.h"
|
||||
#include "idl_gen_go.h"
|
||||
#include "idl_gen_java.h"
|
||||
#include "idl_gen_json_schema.h"
|
||||
@@ -100,6 +101,11 @@ int main(int argc, const char *argv[]) {
|
||||
"Generate Dart classes for tables/structs" },
|
||||
flatbuffers::NewDartCodeGenerator());
|
||||
|
||||
flatc.RegisterCodeGenerator(
|
||||
flatbuffers::FlatCOption{ "", "proto", "",
|
||||
"Input is a .proto, translate to .fbs" },
|
||||
flatbuffers::NewFBSCodeGenerator());
|
||||
|
||||
flatc.RegisterCodeGenerator(
|
||||
flatbuffers::FlatCOption{ "g", "go", "",
|
||||
"Generate Go files for tables/structs" },
|
||||
|
||||
Reference in New Issue
Block a user