ast updated

This commit is contained in:
2026-05-17 16:30:49 +03:00
parent 208d34864e
commit 24750ddcbe
20 changed files with 194 additions and 38 deletions
+8 -2
View File
@@ -1,11 +1,17 @@
#pragma once
#include "BlockNode.h"
#include "ast/BlockNode/BlockNode.h"
#include "utils/shorten.hpp"
struct CodeBlock : public BlockNode {
std::string language;
std::string code;
NodeKind getKind() const {
NodeKind getKind() const override {
return NodeKind::CodeBlock;
}
void repr(std::ostream &os, int indent = 0) const override {
os << getIndent(indent) << toString(this->getKind()) << " lang: " << this->language << " code: " << shorten(this->code) << '\n';
}
};