Implements return statement
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:
@@ -20,6 +20,7 @@ class Script {
|
||||
Evaluator* _evaluator;
|
||||
unordered_map<int, shared_ptr<EvalValue>>* _scriptVariables;
|
||||
BoundScriptStatement* _boundScript;
|
||||
shared_ptr<ScriptType> _returnType;
|
||||
|
||||
explicit Script();
|
||||
void Parse(string script);
|
||||
@@ -29,6 +30,10 @@ public:
|
||||
|
||||
~Script();
|
||||
|
||||
shared_ptr<ScriptType> GetReturnType(){
|
||||
return _returnType;
|
||||
}
|
||||
|
||||
void Evaluate();
|
||||
|
||||
EvalValue* GetLastValue();
|
||||
@@ -36,10 +41,8 @@ public:
|
||||
EvalValue* GetVariable(const string& key);
|
||||
bool HasVariable(const string& key);
|
||||
|
||||
EvalValue* CallFunction(const string& key, vector<EvalValue*> variables);
|
||||
shared_ptr<EvalValue> CallFunction(const string& key, vector<EvalValue*> variables);
|
||||
bool HasFunction(const string& key);
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user