Step 333: Template Class Declarations (12/12 tests)

isClassTemplate/isVariadic serialization, isCRTPClass detection helper,
CompactAST getNodeName for GenericType/TypeParameter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Bill
2026-02-16 00:18:56 -07:00
parent b1654f0b85
commit 6b2b5bf13b
5 changed files with 280 additions and 0 deletions

View File

@@ -410,6 +410,13 @@ inline std::string getNodeName(const ASTNode* node) {
return static_cast<const InterfaceDeclaration*>(node)->name;
if (ct == "MethodDeclaration")
return static_cast<const MethodDeclaration*>(node)->name;
// Generic types (Sprint 12c)
if (ct == "GenericType") {
auto* g = static_cast<const GenericType*>(node);
return g->isClassTemplate ? ("template:" + g->baseName) : g->baseName;
}
if (ct == "TypeParameter")
return static_cast<const TypeParameter*>(node)->name;
// Host Boundary (Step 288)
if (ct == "HostCall")
return static_cast<const HostCall*>(node)->name;