[fuzzer] Adds code generation target. (#8795)

* adds code generation fuzzer target.

* add buffer verification

* add table verification in codegen fuzzer

---------

Co-authored-by: Björn Harrtell <bjornharrtell@users.noreply.github.com>
This commit is contained in:
coder7695
2025-11-27 16:52:28 +01:00
committed by GitHub
parent 84f4b83d3e
commit 2b107e20c5
13 changed files with 495 additions and 10 deletions

View File

@@ -47,7 +47,7 @@ struct NsDefinition {
std::string path;
std::string filepath;
std::string symbolic_name;
const Namespace* ns;
const Namespace* ns = nullptr;
std::map<std::string, const Definition*> definitions;
};
@@ -258,7 +258,7 @@ class TsGenerator : public BaseGenerator {
nsDef.path = root;
nsDef.symbolic_name = file_name_;
nsDef.filepath = path_ + file_name_ + ".ts";
nsDef.ns = new Namespace();
nsDef.ns = parser_.empty_namespace_;
ns_defs_[nsDef.path] = nsDef;
}