refactored ast, started lexer
This commit is contained in:
@@ -3,15 +3,12 @@
|
||||
#include "ast/BlockNode/BlockNode.h"
|
||||
#include "utils/shorten.hpp"
|
||||
|
||||
struct CodeBlock : public BlockNode {
|
||||
std::string language;
|
||||
std::string code;
|
||||
namespace ast {
|
||||
struct CodeBlock : public BlockNode {
|
||||
std::string language;
|
||||
std::string code;
|
||||
|
||||
NodeKind getKind() const override {
|
||||
return NodeKind::CodeBlock;
|
||||
}
|
||||
|
||||
void repr(std::ostream &os, int indent = 0) const override {
|
||||
os << getIndent(indent) << toString(this->getKind()) << " lang: " << this->language << " code: " << shorten(this->code) << '\n';
|
||||
}
|
||||
};
|
||||
NodeKind getKind() const override;
|
||||
void repr(std::ostream &os, int indent = 0) const override;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user