Split expressions into separate files

This commit is contained in:
Rafał Grodziński
2025-06-23 17:01:52 +09:00
parent 4bab8077af
commit 7960c7c198
26 changed files with 368 additions and 372 deletions

View File

@@ -0,0 +1,37 @@
#ifndef EXPRESSION_H
#define EXPRESSION_H
#include <iostream>
#include "Lexer/Token.h"
#include "Types.h"
using namespace std;
enum class ExpressionKind {
LITERAL,
GROUPING,
BINARY,
IF_ELSE,
VAR,
CALL,
BLOCK,
INVALID
};
class Expression {
private:
ExpressionKind kind;
protected:
ValueType valueType;
public:
Expression(ExpressionKind kind, ValueType valueType);
ExpressionKind getKind();
ValueType getValueType();
bool isValid();
virtual string toString(int indent);
};
#endif