[svn] r7441: nemerle/trunk/ncc/parsing/MainParser.n vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Complet...

IT svnadmin at nemerle.org
Sun Feb 18 08:13:40 CET 2007


Log:
Working on ExprFinder.

Author: IT
Date: Sun Feb 18 08:13:37 2007
New Revision: 7441

Modified:
   nemerle/trunk/ncc/parsing/MainParser.n
   vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Type.n
   vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/QuickTipInfo.n

Modified: nemerle/trunk/ncc/parsing/MainParser.n
==============================================================================
--- nemerle/trunk/ncc/parsing/MainParser.n	(original)
+++ nemerle/trunk/ncc/parsing/MainParser.n	Sun Feb 18 08:13:37 2007
@@ -1947,8 +1947,7 @@
           | [x] => x
           | [] => fatal_error (last_tok, "match case body cannot be empty")
           | l =>
-            mutable loc = l.Head.Location;
-            l.Tail.Iter(e => loc = loc.Combine(e.Location));
+            def loc = l.Tail.FoldLeft(l.Head.Location, (e, loc) => loc.Combine(e.Location));
             PExpr.Sequence (loc, l)
         };
 

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	Sun Feb 18 08:13:37 2007
@@ -281,7 +281,12 @@
       | tc is TExpr.ImplicitValueTypeCtor => (QuickTipInfo(loc, tc.ty))
       | fh is Typedtree.Fun_header        => (QuickTipInfo(loc, fh))
       | p  is Pattern.Enum                => (QuickTipInfo(loc, p.fld, manager))
+      | null                              => (null)
+#if DEBUG
+      | o                                 => (QuickTipInfo(loc, o))
+#else
       | _                                 => (null)
+#endif
       }
     }
 

Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/QuickTipInfo.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/QuickTipInfo.n	(original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/QuickTipInfo.n	Sun Feb 18 08:13:37 2007
@@ -72,6 +72,12 @@
       _text = me.MakeHint();
     }
 
+    public this(location : Location, obj : object)
+    {
+      SetLocation(location);
+      _text = $"$(obj.GetType()): $(obj.ToString())";
+    }
+
     private SetLocation(location : Location) : void
     {
       _lineStart = location.Line      - 1;



More information about the svn mailing list