mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-28 04:48:05 +00:00
copy properties for conformance parser (#8174)
This commit is contained in:
@@ -727,6 +727,11 @@ void FlatCompiler::ValidateOptions(const FlatCOptions &options) {
|
|||||||
flatbuffers::Parser FlatCompiler::GetConformParser(
|
flatbuffers::Parser FlatCompiler::GetConformParser(
|
||||||
const FlatCOptions &options) {
|
const FlatCOptions &options) {
|
||||||
flatbuffers::Parser conform_parser;
|
flatbuffers::Parser conform_parser;
|
||||||
|
|
||||||
|
// conform parser should check advanced options,
|
||||||
|
// so, it have to have knowledge about languages:
|
||||||
|
conform_parser.opts.lang_to_generate = options.opts.lang_to_generate;
|
||||||
|
|
||||||
if (!options.conform_to_schema.empty()) {
|
if (!options.conform_to_schema.empty()) {
|
||||||
std::string contents;
|
std::string contents;
|
||||||
if (!flatbuffers::LoadFile(options.conform_to_schema.c_str(), true,
|
if (!flatbuffers::LoadFile(options.conform_to_schema.c_str(), true,
|
||||||
|
|||||||
Reference in New Issue
Block a user