Jump to specific function scope when calling function
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:
@@ -82,13 +82,15 @@ class FunctionScriptType : public ScriptType{
|
||||
shared_ptr<ScriptType> _returnType;
|
||||
vector<shared_ptr<ScriptType>> _parameterTypes;
|
||||
vector<shared_ptr<BoundVariableKey>> _parameterKeys;
|
||||
int _scopeIndex;
|
||||
public:
|
||||
FunctionScriptType(std::shared_ptr<ScriptType> returnType, vector<shared_ptr<ScriptType>> parameterTypes,
|
||||
vector<shared_ptr<BoundVariableKey>> parameterKeys)
|
||||
vector<shared_ptr<BoundVariableKey>> parameterKeys, int scopeIndex)
|
||||
: ScriptType(TypeClass::Function){
|
||||
_returnType = std::move(returnType);
|
||||
_parameterTypes = std::move(parameterTypes);
|
||||
_parameterKeys = std::move(parameterKeys);
|
||||
_scopeIndex = scopeIndex;
|
||||
}
|
||||
shared_ptr<ScriptType> GetReturnType(){
|
||||
return _returnType;
|
||||
@@ -101,6 +103,10 @@ public:
|
||||
vector<shared_ptr<BoundVariableKey>> GetParameterKeys(){
|
||||
return _parameterKeys;
|
||||
}
|
||||
|
||||
int GetScopeIndex(){
|
||||
return _scopeIndex;
|
||||
}
|
||||
};
|
||||
|
||||
#endif //PORYGONLANG_SCRIPTTYPE_HPP
|
||||
|
||||
Reference in New Issue
Block a user