[svn] r7644: vs-plugin/trunk: Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/ExprWalker.n Nemerle.Co...

VladD2 svnadmin at nemerle.org
Tue May 1 18:54:30 CEST 2007


Log:
Refactoring.

Author: VladD2
Date: Tue May  1 18:54:27 2007
New Revision: 7644

Modified:
   vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/ExprWalker.n
   vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Refactoring.n
   vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Type.n
   vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleIdeBuildLogger.cs

Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/ExprWalker.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/ExprWalker.n	(original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/ExprWalker.n	Tue May  1 18:54:27 2007
@@ -579,8 +579,13 @@
       {
         match (info.Node)
         {
+        | tExpr is TExpr =>
+          match (tExpr)
+          {
         | TExpr.Delayed(susp) when !susp.IsResolved => susp.Resolve();
-        | _ => ();
+          | _ => ()
+          }
+        | _ => ()
         }
       });
     }

Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Refactoring.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Refactoring.n	(original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Refactoring.n	Tue May  1 18:54:27 2007
@@ -128,12 +128,17 @@
     {
       def (_, parsedObject, tObj) = FindObject(typeDecl, fileIndex, line, column);
 
-      def getTypeGotoInfo(tv) 
+      def getTypeGotoInfo(tv : TyVar) 
+      {
+      | mType is MType =>
+        match (mType)
       {
         | MType.Class(ty is TypeBuilder, _) => ty.AstParts.Map(p => GotoInfo(p.name.Location));
         | MType.Class(ty, _)                => [GotoInfo(ty)]
         | _                                 => []
       }
+      | _                                   => []
+      }
 
       match (tObj)
       {

Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Type.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Type.n	(original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Type.n	Tue May  1 18:54:27 2007
@@ -96,7 +96,7 @@
         if (typeBuilder.IsDelegate) typeBuilder : IMember
         else typeBuilder.GetMemberByLocation(fileIndex, line, col);
 
-      def checkType(pexpr, texpr) 
+      def checkType(pexpr, texpr : TyVar) 
       {
         def pargs =
           match (pexpr)
@@ -114,12 +114,17 @@
             def targs =
               match (texpr)
               {
+              | mType is MType =>
+                match (mType)
+                {
               | MType.Array (p, _) => [p]
-              | MType.Fun   (f, t) => [f,t]
+                | MType.Fun   (f, t) => [f, t]
               | MType.Class (_, p)
               | MType.Tuple (p)    => p
               | _                  => []
               }
+              | _                    => []
+              };
 
             def idx = pargs.IndexOf(p);
             checkType(p, targs.Nth(idx))

Modified: vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleIdeBuildLogger.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleIdeBuildLogger.cs	(original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleIdeBuildLogger.cs	Tue May  1 18:54:27 2007
@@ -182,7 +182,7 @@
 				// Format error and output it to the output window
 				string message = FormatMessage(errorEvent.Message);
 				CompilerError e = new CompilerError(file, line, column, errorCode, message);
-				e.IsWarning = (errorEvent is BuildWarningEventArgs);
+				e.IsWarning = errorEvent is BuildWarningEventArgs;
 
 				Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(
 					OutputWindowPane.OutputStringThreadSafe(GetFormattedErrorMessage(e)));



More information about the svn mailing list