Each statement class in separate file

This commit is contained in:
Rafał Grodziński
2025-06-23 11:20:20 +09:00
parent 37289cfad8
commit 50c867d61c
25 changed files with 414 additions and 377 deletions

View File

@@ -0,0 +1,40 @@
#ifndef STATEMENT_H
#define STATEMENT_H
#include <iostream>
#include "Lexer/Token.h"
#include "Parser/Expression.h"
#include "Types.h"
class Expression;
class Statement;
class StatementBlock;
class StatementReturn;
class StatementExpression;
class StatementInvalid;
using namespace std;
enum class StatementKind {
FUNCTION_DECLARATION,
VAR_DECLARATION,
BLOCK,
RETURN,
EXPRESSION,
META_EXTERN_FUNCTION,
INVALID
};
class Statement {
private:
StatementKind kind;
public:
Statement(StatementKind kind);
StatementKind getKind();
bool isValid();
virtual string toString(int indent);
};
#endif