Fixes diagnostics breaking when using ContinueWith function

This commit is contained in:
Deukhoofd 2018-11-27 17:40:54 +01:00
parent 0279859637
commit dd8569ecb0
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
1 changed files with 6 additions and 3 deletions

View File

@ -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;
} }