Generate functions

This commit is contained in:
Rafał Grodziński
2025-06-02 10:45:44 +09:00
parent 2cecb456bb
commit 2ef888e374
7 changed files with 92 additions and 31 deletions

View File

@@ -11,10 +11,10 @@ using namespace std;
class Statement {
public:
enum Kind {
EXPRESSION,
BLOCK,
FUNCTION_DECLARATION,
BLOCK,
RETURN,
EXPRESSION,
INVALID
};
@@ -28,8 +28,12 @@ private:
public:
Statement(Kind kind, shared_ptr<Token> token, shared_ptr<Expression> expression, shared_ptr<Statement> blockStatement, vector<shared_ptr<Statement>> statements, string name);
Kind getKind();
shared_ptr<Token> getToken();
shared_ptr<Expression> getExpression();
shared_ptr<Statement> getBlockStatement();
vector<shared_ptr<Statement>> getStatements();
string getName();
bool isValid();
string toString();
};