Skip to content

Commit

Permalink
copy properties for conformance parser (#8174)
Browse files Browse the repository at this point in the history
  • Loading branch information
blindspotbounty committed Nov 26, 2023
1 parent c6f9e01 commit da55ac3
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 da55ac3

Please sign in to comment.