a little bit of cleanup
This commit is contained in:
@@ -9,13 +9,7 @@ namespace ast {
|
|||||||
virtual ~node() = default;
|
virtual ~node() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct statement : node {
|
struct statement : node {};
|
||||||
virtual std::string token_literal() const override = 0;
|
|
||||||
virtual std::string str() const override = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct expression : node {
|
struct expression : node {};
|
||||||
virtual std::string token_literal() const override = 0;
|
|
||||||
virtual std::string str() const override = 0;
|
|
||||||
};
|
|
||||||
} // namespace ast
|
} // namespace ast
|
||||||
|
@@ -1,8 +1,5 @@
|
|||||||
#include "parser.hpp"
|
#include "parser.hpp"
|
||||||
|
|
||||||
#include "ast/errors/error.hpp"
|
|
||||||
#include "token/type.hpp"
|
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
namespace parser {
|
namespace parser {
|
||||||
|
@@ -2,12 +2,15 @@
|
|||||||
|
|
||||||
#include "ast/ast.hpp"
|
#include "ast/ast.hpp"
|
||||||
#include "ast/errors/error.hpp"
|
#include "ast/errors/error.hpp"
|
||||||
|
#include "ast/program.hpp"
|
||||||
#include "ast/statements/expression.hpp"
|
#include "ast/statements/expression.hpp"
|
||||||
#include "ast/statements/let.hpp"
|
#include "ast/statements/let.hpp"
|
||||||
#include "ast/statements/return.hpp"
|
#include "ast/statements/return.hpp"
|
||||||
#include "lexer/lexer.hpp"
|
#include "lexer/lexer.hpp"
|
||||||
#include "token/token.hpp"
|
#include "token/token.hpp"
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace parser {
|
namespace parser {
|
||||||
struct parser {
|
struct parser {
|
||||||
parser(lexer::lexer& lexer);
|
parser(lexer::lexer& lexer);
|
||||||
|
Reference in New Issue
Block a user