Files
mdtex-compiler/include/ast/BlockNode/Header.h
T
2026-05-17 16:30:49 +03:00

20 lines
578 B
C++

#pragma once
#include "ast/BlockNode/BlockNode.h"
#include "ast/InlineNode/InlineNode.h"
struct Header : public BlockNode {
int level = 1;
std::vector<std::unique_ptr<InlineNode>> children;
NodeKind getKind() const override {
return NodeKind::Header;
}
void repr(std::ostream &os, int indent = 0) const override {
os << getIndent(indent) << toString(this->getKind()) << " level: " << this->level << '\n';
for (const std::unique_ptr<InlineNode> &child : this->children) {
child->repr(os, indent + 1);
}
}
};