Make functions be able to call themselves
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2019-06-08 16:02:21 +02:00
parent 7d75131822
commit 7ed53193de
6 changed files with 49 additions and 29 deletions

View File

@@ -80,11 +80,11 @@ public:
class FunctionScriptType : public ScriptType{
shared_ptr<ScriptType> _returnType;
shared_ptr<vector<shared_ptr<ScriptType>>> _parameterTypes;
shared_ptr<vector<shared_ptr<BoundVariableKey>>> _parameterKeys;
vector<shared_ptr<ScriptType>> _parameterTypes;
vector<shared_ptr<BoundVariableKey>> _parameterKeys;
public:
FunctionScriptType(std::shared_ptr<ScriptType> returnType, shared_ptr<vector<shared_ptr<ScriptType>>> parameterTypes,
shared_ptr<vector<shared_ptr<BoundVariableKey>>> parameterKeys)
FunctionScriptType(std::shared_ptr<ScriptType> returnType, vector<shared_ptr<ScriptType>> parameterTypes,
vector<shared_ptr<BoundVariableKey>> parameterKeys)
: ScriptType(TypeClass::Function){
_returnType = std::move(returnType);
_parameterTypes = std::move(parameterTypes);
@@ -94,11 +94,11 @@ public:
return _returnType;
}
shared_ptr<vector<shared_ptr<ScriptType>>> GetParameterTypes(){
vector<shared_ptr<ScriptType>> GetParameterTypes(){
return _parameterTypes;
}
shared_ptr<vector<shared_ptr<BoundVariableKey>>> GetParameterKeys(){
vector<shared_ptr<BoundVariableKey>> GetParameterKeys(){
return _parameterKeys;
}
};