refactored ast, started lexer
This commit is contained in:
@@ -2,17 +2,11 @@
|
||||
|
||||
#include "ast/InlineNode/InlineNode.h"
|
||||
|
||||
struct Italic : public InlineNode {
|
||||
std::vector<std::unique_ptr<InlineNode>> children;
|
||||
|
||||
NodeKind getKind() const override {
|
||||
return NodeKind::Italic;
|
||||
}
|
||||
|
||||
void repr(std::ostream &os, int indent) const override {
|
||||
os << getIndent(indent) << toString(this->getKind()) << '\n';
|
||||
for (const std::unique_ptr<InlineNode> &child : this->children) {
|
||||
child->repr(os, indent + 1);
|
||||
}
|
||||
}
|
||||
};
|
||||
namespace ast {
|
||||
struct Italic : public InlineNode {
|
||||
std::vector<std::unique_ptr<InlineNode>> children;
|
||||
|
||||
NodeKind getKind() const override;
|
||||
void repr(std::ostream &os, int indent) const override;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user