[svn]
r7209: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Checker.n
VladD2
svnadmin at nemerle.org
Fri Jan 5 17:13:01 CET 2007
Log:
Fix the bug emergent during method splinting.
Author: VladD2
Date: Fri Jan 5 17:13:00 2007
New Revision: 7209
Modified:
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Checker.n
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Checker.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Checker.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Checker.n Fri Jan 5 17:13:00 2007
@@ -475,9 +475,14 @@
mutable errors = _project.GetAllCompilerMessageForFile(_fileIndex).ToArray();
+ // Check compiler error messages for brace errors.
+ // If brace errors exists and calculate brace match,
+ // and if match we must reparce type tree (it reset method
+ // editing optimization).
def isBraceErrorMsg = errors.Exists(cm =>
cm.Message.Contains("when parsing this `{' brace group")
- || cm.Message.Contains("unexpected end of file"));
+ || cm.Message.Contains("unexpected end of file")
+ || cm.Message.Contains("expected end of file, encountered closing brace"));
def engine = _project.Engine;
def isBraceMatch()
@@ -522,7 +527,7 @@
when (isBraceErrorMsg && isBraceMatch()) // Rebuild "type tree".
{
engine.ResetTypeTree();
- _project = engine.Project;
+ _project = engine.Project; // new type tree.
errors = _project.GetAllCompilerMessageForFile(_fileIndex).ToArray();
}
More information about the svn
mailing list