[svn] r7093: nemerle/trunk/ncc/typing/Typer-PatternTyper.n

VladD2 svnadmin at nemerle.org
Fri Dec 15 11:30:55 CET 2006


Log:
Move pattern completion logic into Nemerle.Compiler.Utils project.

Author: VladD2
Date: Fri Dec 15 11:30:54 2006
New Revision: 7093

Modified:
   nemerle/trunk/ncc/typing/Typer-PatternTyper.n

Modified: nemerle/trunk/ncc/typing/Typer-PatternTyper.n
==============================================================================
--- nemerle/trunk/ncc/typing/Typer-PatternTyper.n	(original)
+++ nemerle/trunk/ncc/typing/Typer-PatternTyper.n	Fri Dec 15 11:30:54 2006
@@ -557,12 +557,10 @@
 
       DoTypePattern (matched_value_type : TyVar, pattern : PT.PExpr) : Pattern
       {
-        match (pattern) {
-          | PT.PExpr.ToComplete (_)
-          | PT.PExpr.Member (_, Parsetree.Splicable.HalfId (_)) =>
+        when (Manager.IsCompletioInProgress)
             Manager.CompletePattern (pattern, matched_value_type, this, typer.env);
-            throw System.NotImplementedException ();
 
+        match (pattern) {
           | PT.PExpr.TypeEnforcement (_, PT.PExpr.ToComplete (_))
           | PT.PExpr.TypeEnforcement (_, PT.PExpr.Member (_, Parsetree.Splicable.HalfId (_)))
           | PT.PExpr.Is (_, PT.PExpr.ToComplete (_))
@@ -771,6 +769,9 @@
                          ".. arguments list may appear only within <[ ... ]> quotation");
             Pattern.Error ()
 
+          | PT.PExpr.ToComplete =>
+            Util.ice ("The completion tokens allowed only if Manager.IsCompletioInProgress is true.")
+
           | _ =>
             ReportError (messenger, "invalid pattern");
             Pattern.Error ()



More information about the svn mailing list