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,26 @@
#include "ExpressionCall.h"
ExpressionCall::ExpressionCall(string name, vector<shared_ptr<Expression>> argumentExpressions):
Expression(ExpressionKind::CALL, ValueType::NONE), name(name), argumentExpressions(argumentExpressions) { }
string ExpressionCall::getName() {
return name;
}
vector<shared_ptr<Expression>> ExpressionCall::getArgumentExpressions() {
return argumentExpressions;
}
string ExpressionCall::toString(int indent) {
string value;
value += "CALL(" + name + "):";
for (shared_ptr<Expression> &argumentExpression : argumentExpressions) {
value += "\n";
for (int ind=0; ind<indent+1; ind++)
value += " ";
value += argumentExpression->toString(indent+1) + ",";
}
return value;
}