shithub: mc

Download patch

ref: 42e46e1b22d03c57fa8c424b46c3645e921966e0
parent: a27c66fd16dc47c13c9169bc87a723901eb1a5af
author: Ori Bernstein <[email protected]>
date: Mon Aug 19 06:43:21 EDT 2013

Allow dots in union patterns.

    Now we can match on imported unions.

--- a/parse/gram.y
+++ b/parse/gram.y
@@ -706,10 +706,10 @@
         | Toparen pat Tcparen {$$ = $2;}
         ;
 
-unionpat: Ttick Tident pat
-            {$$ = mkexpr($1->line, Oucon, mkname($2->line, $2->str), $3, NULL);}
-        | Ttick Tident
-            {$$ = mkexpr($1->line, Oucon, mkname($2->line, $2->str), NULL);}
+unionpat: Ttick name pat
+            {$$ = mkexpr($1->line, Oucon, $2, $3, NULL);}
+        | Ttick name
+            {$$ = mkexpr($1->line, Oucon, $2, NULL);}
         ;
 
 block   : blkbody Tendblk