This commit is contained in:
nub31
2025-10-25 18:07:34 +02:00
parent 3f18aa4782
commit 396ddf93a2
18 changed files with 951 additions and 598 deletions

View File

@@ -34,7 +34,15 @@ public class WorkspaceManager(DiagnosticsPublisher diagnosticsPublisher)
var typeChecker = new TypeChecker(syntaxTree, modules);
var result = typeChecker.Check();
diagnosticsPublisher.Publish(fsPath, typeChecker.Diagnostics);
_compilationUnits[fsPath] = result;
if (result == null)
{
_compilationUnits.Remove(fsPath);
}
else
{
_compilationUnits[fsPath] = result;
}
}
}
@@ -57,7 +65,15 @@ public class WorkspaceManager(DiagnosticsPublisher diagnosticsPublisher)
var typeChecker = new TypeChecker(syntaxTree, modules);
var result = typeChecker.Check();
diagnosticsPublisher.Publish(fsPath, typeChecker.Diagnostics);
_compilationUnits[fsPath] = result;
if (result == null)
{
_compilationUnits.Remove(fsPath);
}
else
{
_compilationUnits[fsPath] = result;
}
}
public void RemoveFile(DocumentUri path)