Skip to content

Commit

Permalink
copy properties for conformance parser (google#8174)
Browse files Browse the repository at this point in the history
  • Loading branch information
blindspotbounty authored and candysonya committed Jan 8, 2024
1 parent bf1f11f commit 96a254c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/flatc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,11 @@ void FlatCompiler::ValidateOptions(const FlatCOptions &options) {
flatbuffers::Parser FlatCompiler::GetConformParser(
const FlatCOptions &options) {
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()) {
std::string contents;
if (!flatbuffers::LoadFile(options.conform_to_schema.c_str(), true,
Expand Down

0 comments on commit 96a254c

Please sign in to comment.