Fix bound scope sometimes losing static variables defined in json

This commit is contained in:
Deukhoofd committed 2018-12-12 22:43:04 +01:00
1 parent d1c0a61bd1
commit d6b65a8d16
2 files changed
+3 -1

No files matched your search

@@ -85,6 +85,9 @@ namespace UpsilonLanguageServer
public static void LoadStaticVariables(string fileContent)
{
// We call the evaluation scope so that it initializes, and won't overwrite the bound scope later on
// DONT REMOVE
var _ = StaticScope.Scope;
StaticScope.BoundScope = StaticScope.CreateStandardLibrary().Item2;
var json = JObject.Parse(fileContent);
foreach (var property in json.Properties())
@@ -40,7 +40,6 @@ namespace UpsilonLanguageServer
{
ThrowExceptionOnError = false,
SaveDataComments = true,
};
private static async Task RealLint(TextDocument document, int maxNumberOfProblems, SessionDocument session,