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