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