Steps 290-294: Phase 11a — Semanno format, annotation codegen, visitor dispatch (60/60 tests)
Semanno comment format standard (@semanno:type(key=value)) with emitter/parser covering all 67+ annotation types. SemannoAnnotationImpl CRTP mixin provides default visitor implementations for all 56 extended annotation methods across 7 language generators. Virtual inheritance resolves diamond ambiguity between ProjectionGenerator and SemannoAnnotationImpl. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
#pragma once
|
||||
#include "ProjectionGenerator.h"
|
||||
#include "Import.h"
|
||||
#include "../SemannoAnnotationImpl.h"
|
||||
|
||||
class GoGenerator : public ProjectionGenerator {
|
||||
class GoGenerator : public ProjectionGenerator, public SemannoAnnotationImpl<GoGenerator> {
|
||||
public:
|
||||
std::string commentPrefix() const { return "// "; }
|
||||
|
||||
std::string generate(const ASTNode* node) override {
|
||||
return dispatchGenerate(this, node, "// Unknown concept: ");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user