17 lines
461 B
C++
17 lines
461 B
C++
#pragma once
|
|
|
|
#include "ast/BlockNode/BlockNode.h"
|
|
#include "utils/shorten.hpp"
|
|
|
|
struct CodeBlock : public BlockNode {
|
|
std::string language;
|
|
std::string code;
|
|
|
|
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';
|
|
}
|
|
}; |