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:
Khanh Nguyen
2023-03-02 10:01:44 -08:00
committed by GitHub
parent 6a9cd4411f
commit 4a34cd70dc
7 changed files with 119 additions and 16 deletions

View File

@@ -105,6 +105,7 @@ PHP_OPTS = ["--php"]
DART_OPTS = ["--dart"]
PYTHON_OPTS = ["--python"]
BINARY_OPTS = ["-b", "--schema", "--bfbs-comments", "--bfbs-builtins"]
PROTO_OPTS = ["--proto"]
# Basic Usage
@@ -192,6 +193,11 @@ flatc(
data="monsterdata_test.json",
)
flatc(
PROTO_OPTS,
schema="prototest/test.proto",
)
# For Rust we currently generate two independent schemas, with namespace_test2
# duplicating the types in namespace_test1
flatc(