Sprint 2 Step 1: base ASTNode class and Module concept
Adds the C++ editor stack foundation with ASTNode (id, conceptType, parent pointer, virtual dtor) and Module as the first concrete concept (name, targetLanguage). Header-only, compiles with C++20, test passes all assertions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
16
editor/tests/step1_test.cpp
Normal file
16
editor/tests/step1_test.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include "../src/ast/Module.h"
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
|
||||
int main() {
|
||||
Module m("SFE_M001", "SimpleFunctionExample", "python");
|
||||
|
||||
assert(m.id == "SFE_M001");
|
||||
assert(m.name == "SimpleFunctionExample");
|
||||
assert(m.targetLanguage == "python");
|
||||
assert(m.conceptType == "Module");
|
||||
assert(m.parent == nullptr);
|
||||
|
||||
std::cout << "Step 1: PASS" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user