Step 364: Add C integration tests and projection coverage

This commit is contained in:
Bill
2026-02-16 09:46:36 -07:00
parent f7fbec7bc4
commit 0f6e5333ae
4 changed files with 274 additions and 1 deletions

View File

@@ -52,6 +52,14 @@ public:
}
}
// Copy classes and statements for cross-language structural projection.
for (auto* child : source->getChildren("classes")) {
if (ASTNode* n = cloneNode(child, targetLanguage)) mod->addChild("classes", n);
}
for (auto* child : source->getChildren("statements")) {
if (ASTNode* n = cloneNode(child, targetLanguage)) mod->addChild("statements", n);
}
// Copy module-level variables
for (auto* child : source->getChildren("variables")) {
if (child->conceptType == "Variable") {
@@ -539,7 +547,10 @@ private:
return cloneAnnotation(node, targetLanguage);
}
return nullptr;
// Generic clone fallback for declaration nodes not yet specialized.
json nodeJson = toJson(node);
nodeJson["id"] = node->id + "_proj";
return fromJson(nodeJson);
}
static std::string adaptReclaimStrategy(const std::string& strategy,