Implements support for functions with the same name, but different parameters
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "../../ScriptType.hpp"
|
||||
#include "../BoundOperators.hpp"
|
||||
#include "../BoundVariables/BoundVariableKey.hpp"
|
||||
#include "../../FunctionScriptType.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -227,36 +228,6 @@ namespace Porygon::Binder {
|
||||
}
|
||||
};
|
||||
|
||||
class BoundFunctionCallExpression : public BoundExpression {
|
||||
const BoundExpression *_functionExpression;
|
||||
const vector<BoundExpression *> _parameters;
|
||||
public:
|
||||
BoundFunctionCallExpression(BoundExpression *functionExpression, vector<BoundExpression *> parameters,
|
||||
shared_ptr<ScriptType> result,
|
||||
unsigned int start, unsigned int length)
|
||||
: BoundExpression(start, length, std::move(result)), _functionExpression(functionExpression),
|
||||
_parameters(std::move(parameters)) {}
|
||||
|
||||
~BoundFunctionCallExpression() final {
|
||||
delete _functionExpression;
|
||||
for (auto p : _parameters) {
|
||||
delete p;
|
||||
}
|
||||
}
|
||||
|
||||
const BoundExpressionKind GetKind() const final {
|
||||
return BoundExpressionKind::FunctionCall;
|
||||
}
|
||||
|
||||
const BoundExpression *GetFunctionExpression() const {
|
||||
return _functionExpression;
|
||||
}
|
||||
|
||||
const vector<BoundExpression *> *GetParameters() const {
|
||||
return &_parameters;
|
||||
}
|
||||
};
|
||||
|
||||
class BoundIndexExpression : public BoundExpression {
|
||||
const BoundExpression *_indexableExpression;
|
||||
const BoundExpression *_indexExpression;
|
||||
|
||||
Reference in New Issue
Block a user