This commit is contained in:
@@ -24,13 +24,12 @@ Porygon::Script *Porygon::Script::Create(const string &script) {
|
||||
return Script::Create(To_UTF16(script));
|
||||
}
|
||||
|
||||
Porygon::Script::Script(const u16string& s) {
|
||||
Diagnostics = make_shared<Diagnostics::DiagnosticsHolder>(s);
|
||||
_boundScript = nullptr;
|
||||
|
||||
_scriptVariables = new map<Utilities::HashedString, shared_ptr<EvalValue>>();
|
||||
Porygon::Script::Script(const u16string& s)
|
||||
: Diagnostics(make_shared<Diagnostics::DiagnosticsHolder>(s)),
|
||||
_boundScript(nullptr),
|
||||
_scriptVariables(new map<Utilities::HashedString, shared_ptr<EvalValue>>())
|
||||
{
|
||||
_evaluator = new Evaluator(this -> _scriptVariables);
|
||||
|
||||
this -> Parse(s);
|
||||
}
|
||||
|
||||
@@ -99,10 +98,11 @@ Porygon::Script *Porygon::Script::Clone(const Porygon::Script *script) {
|
||||
}
|
||||
|
||||
Porygon::Script::Script(shared_ptr<BoundScriptStatement> boundScript,
|
||||
shared_ptr<Porygon::Diagnostics::DiagnosticsHolder> diagnostics) {
|
||||
_boundScript = std::move(boundScript);
|
||||
Diagnostics = std::move(diagnostics);
|
||||
_scriptVariables = new map<Utilities::HashedString, shared_ptr<EvalValue>>();
|
||||
shared_ptr<Porygon::Diagnostics::DiagnosticsHolder> diagnostics)
|
||||
: _boundScript(std::move(boundScript)),
|
||||
Diagnostics(std::move(diagnostics)),
|
||||
_scriptVariables(new map<Utilities::HashedString, shared_ptr<EvalValue>>())
|
||||
{
|
||||
_evaluator = new Evaluator(_scriptVariables);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user