mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-01 04:21:36 +00:00
Update idl.h
This commit is contained in:
@@ -337,7 +337,8 @@ struct IDLOptions {
|
|||||||
bool generate_all;
|
bool generate_all;
|
||||||
bool skip_unexpected_fields_in_json;
|
bool skip_unexpected_fields_in_json;
|
||||||
bool generate_name_strings;
|
bool generate_name_strings;
|
||||||
|
bool escape_proto_identifiers;
|
||||||
|
|
||||||
// Possible options for the more general generator below.
|
// Possible options for the more general generator below.
|
||||||
enum Language { kJava, kCSharp, kGo, kMAX };
|
enum Language { kJava, kCSharp, kGo, kMAX };
|
||||||
|
|
||||||
@@ -356,6 +357,7 @@ struct IDLOptions {
|
|||||||
generate_all(false),
|
generate_all(false),
|
||||||
skip_unexpected_fields_in_json(false),
|
skip_unexpected_fields_in_json(false),
|
||||||
generate_name_strings(false),
|
generate_name_strings(false),
|
||||||
|
escape_proto_identifiers(false),
|
||||||
lang(IDLOptions::kJava) {}
|
lang(IDLOptions::kJava) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -644,10 +646,12 @@ extern bool GenerateGeneral(const Parser &parser,
|
|||||||
// Generate a schema file from the internal representation, useful after
|
// Generate a schema file from the internal representation, useful after
|
||||||
// parsing a .proto schema.
|
// parsing a .proto schema.
|
||||||
extern std::string GenerateFBS(const Parser &parser,
|
extern std::string GenerateFBS(const Parser &parser,
|
||||||
const std::string &file_name);
|
const std::string &file_name,
|
||||||
|
const bool &escape_proto_identifiers);
|
||||||
extern bool GenerateFBS(const Parser &parser,
|
extern bool GenerateFBS(const Parser &parser,
|
||||||
const std::string &path,
|
const std::string &path,
|
||||||
const std::string &file_name);
|
const std::string &file_name,
|
||||||
|
const bool &escape_proto_identifiers);
|
||||||
|
|
||||||
// Generate a make rule for the generated JavaScript code.
|
// Generate a make rule for the generated JavaScript code.
|
||||||
// See idl_gen_js.cpp.
|
// See idl_gen_js.cpp.
|
||||||
|
|||||||
Reference in New Issue
Block a user