Updates to new execution method of Upsilon

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

View File

@ -36,12 +36,17 @@ namespace UpsilonLanguageServer
return diag; return diag;
} }
private static readonly ScriptOptions Options = new ScriptOptions()
{
ThrowExceptionOnError = false
};
private static async Task RealLint(TextDocument document, int maxNumberOfProblems, SessionDocument session, private static async Task RealLint(TextDocument document, int maxNumberOfProblems, SessionDocument session,
string content, List<Diagnostic> diag) string content, List<Diagnostic> diag)
{ {
try try
{ {
using (var script = new Script(content)) using (var script = Executor.ParseInput(content, Options))
{ {
session.SourceText = script.ScriptString; session.SourceText = script.ScriptString;
if (script.Diagnostics.Messages.Count > 0) if (script.Diagnostics.Messages.Count > 0)