Fixes diagnostics breaking when using ContinueWith function
This commit is contained in:
parent
0279859637
commit
dd8569ecb0
|
@ -41,9 +41,12 @@ namespace Upsilon.Evaluator
|
||||||
private Script(string scriptString, Binder.Binder binder, Evaluator evaluator, ScriptOptions options)
|
private Script(string scriptString, Binder.Binder binder, Evaluator evaluator, ScriptOptions options)
|
||||||
{
|
{
|
||||||
ScriptString = new SourceText(scriptString);
|
ScriptString = new SourceText(scriptString);
|
||||||
Diagnostics = new Diagnostics(ScriptString, Options.ThrowExceptionOnError);
|
Options = options;
|
||||||
Binder = new Binder.Binder(Diagnostics, binder.Scope.Variables);
|
_scriptString = scriptString;
|
||||||
Evaluator = new Evaluator( Diagnostics, evaluator.Scope.Variables);
|
Diagnostics = new Diagnostics(ScriptString, options.ThrowExceptionOnError);
|
||||||
|
|
||||||
|
Binder = Upsilon.Binder.Binder.CreateWithSetScope(Diagnostics, binder.Scope);
|
||||||
|
Evaluator = Evaluator.CreateWithSetScope(Diagnostics, evaluator.Scope);
|
||||||
Scope = Evaluator.Scope;
|
Scope = Evaluator.Scope;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue