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

20 lines
571 B
C++

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