a little bit of cleanup

This commit is contained in:
Karma Riuk
2025-07-08 10:20:10 +02:00
parent 31cb483602
commit ef624de4ef
3 changed files with 5 additions and 11 deletions

View File

@@ -9,13 +9,7 @@ namespace ast {
virtual ~node() = default;
};
struct statement : node {
virtual std::string token_literal() const override = 0;
virtual std::string str() const override = 0;
};
struct statement : node {};
struct expression : node {
virtual std::string token_literal() const override = 0;
virtual std::string str() const override = 0;
};
struct expression : node {};
} // namespace ast

View File

@@ -1,8 +1,5 @@
#include "parser.hpp"
#include "ast/errors/error.hpp"
#include "token/type.hpp"
#include <sstream>
namespace parser {

View File

@@ -2,12 +2,15 @@
#include "ast/ast.hpp"
#include "ast/errors/error.hpp"
#include "ast/program.hpp"
#include "ast/statements/expression.hpp"
#include "ast/statements/let.hpp"
#include "ast/statements/return.hpp"
#include "lexer/lexer.hpp"
#include "token/token.hpp"
#include <vector>
namespace parser {
struct parser {
parser(lexer::lexer& lexer);