Removed LastValue variable, as it can be better emulated with basic return values
This commit is contained in:
@@ -30,7 +30,7 @@ Porygon::Script::Script(const u16string& s)
|
||||
this -> Parse(s);
|
||||
}
|
||||
|
||||
const EvalValue* Porygon::Script::Evaluate() {
|
||||
shared_ptr<const EvalValue> Porygon::Script::Evaluate() {
|
||||
return _evaluator->Evaluate(_boundScript.get());
|
||||
}
|
||||
|
||||
@@ -71,9 +71,9 @@ bool Porygon::Script::HasVariable(const u16string &key) {
|
||||
return f != _scriptVariables->end();
|
||||
}
|
||||
|
||||
const EvalValue *Porygon::Script::GetLastValue() {
|
||||
/*const EvalValue *Porygon::Script::GetLastValue() {
|
||||
return _evaluator->GetLastValue();
|
||||
}
|
||||
}*/
|
||||
|
||||
bool Porygon::Script::HasFunction(const u16string &key) {
|
||||
auto f = _scriptVariables->find(HashedString::CreateLookup(key));
|
||||
@@ -109,12 +109,10 @@ extern "C" {
|
||||
return Porygon::Script::Create(s);
|
||||
}
|
||||
|
||||
void EvaluateScript(Porygon::Script* script){
|
||||
script->Evaluate();
|
||||
}
|
||||
|
||||
const EvalValue* GetLastValue(Porygon::Script* script){
|
||||
return script->GetLastValue();
|
||||
const EvalValue* EvaluateScript(Porygon::Script* script){
|
||||
auto result = script -> Evaluate();
|
||||
auto resultPtr = result.get();
|
||||
return resultPtr;
|
||||
}
|
||||
|
||||
bool HasVariable(Porygon::Script* script, const char16_t* key){
|
||||
|
||||
Reference in New Issue
Block a user