diff --git a/src/QsCompiler/CompilationManager/FileContentManager.cs b/src/QsCompiler/CompilationManager/FileContentManager.cs index c809247a16..c4e4fa6ebb 100644 --- a/src/QsCompiler/CompilationManager/FileContentManager.cs +++ b/src/QsCompiler/CompilationManager/FileContentManager.cs @@ -197,20 +197,20 @@ private static void InvalidateOrUpdateBySyntaxCheckDelimeters(ManagedList - /// Updates the line numbers of diagnostics that start after the syntax check end delimiter in both the current and latest diagnostics, - /// and removes all diagnostics that overlap with the given range for teh syntax check update in the latest diagnostics only. + /// Updates the line numbers of diagnostics that start after the syntax check end delimiter in both lists of diagnostics, + /// and removes all diagnostics that overlap with the given range for the syntax check update in the updated diagnostics only. /// Throws an ArgumentNullException if the given current and/or latest diagnostics are null, or if the syntax check delimiters are null. /// Throws an ArgumentException if the given start and end position do not denote a valid range. /// - private static void DelayInvalidateOrUpdate(ManagedList current, ManagedList latest, + private static void DelayInvalidateOrUpdate(ManagedList diagnostics, ManagedList updated, Range syntaxCheckDelimiters, int lineNrChange) { - if (current == null) throw new ArgumentNullException(nameof(current)); - if (latest == null) throw new ArgumentNullException(nameof(latest)); + if (diagnostics == null) throw new ArgumentNullException(nameof(diagnostics)); + if (updated == null) throw new ArgumentNullException(nameof(updated)); - InvalidateOrUpdateBySyntaxCheckDelimeters(latest, syntaxCheckDelimiters, lineNrChange); + InvalidateOrUpdateBySyntaxCheckDelimeters(updated, syntaxCheckDelimiters, lineNrChange); Diagnostic updateLineNrs(Diagnostic m) => m.SelectByStart(syntaxCheckDelimiters.End) ? m.WithUpdatedLineNumber(lineNrChange) : m; - if (lineNrChange != 0) current.Transform(updateLineNrs); + if (lineNrChange != 0) diagnostics.Transform(updateLineNrs); } @@ -314,7 +314,7 @@ private void InvalidateOrUpdateContextDiagnostics(int start, int count, int line } /// - /// Replaces the current header diagnostics with the given sequence and pushes the updated header diagnostics. + /// Replaces the header diagnostics with the given sequence and finalizes the header diagnostics update. /// internal void ReplaceHeaderDiagnostics(IEnumerable updates) { @@ -334,7 +334,7 @@ private void InvalidateOrUpdateHeaderDiagnostics(Range syntaxCheckDelimiters, in /// - /// Replaces the current semantic diagnostics with the given sequence and pushes the updated semantic diagnostics. + /// Replaces the semantic diagnostics with the given sequence and finalizes the semantic diagnostics update. /// internal void ReplaceSemanticDiagnostics(IEnumerable updates) { @@ -343,7 +343,7 @@ internal void ReplaceSemanticDiagnostics(IEnumerable updates) } /// - /// Adds the given sequence of semantic diagnostics to the current list and pushes the updated semantic diagnostics. + /// Adds the given sequence of semantic diagnostics and finalizes the semantic diagnostics update. /// internal void AddAndFinalizeSemanticDiagnostics(IEnumerable updates) {