Author: jonathan
Date: Mon Jan 19 14:19:34 2009
New Revision: 35774

Modified:
   trunk/languages/perl6/src/builtins/assign.pir
   trunk/languages/perl6/src/parser/grammar-oper.pg

Log:
[rakudo] Make //= work (but see RT#61880 for discussion on this patch).

Modified: trunk/languages/perl6/src/builtins/assign.pir
==============================================================================
--- trunk/languages/perl6/src/builtins/assign.pir       (original)
+++ trunk/languages/perl6/src/builtins/assign.pir       Mon Jan 19 14:19:34 2009
@@ -202,6 +202,23 @@
 .end
 
 
+=item infix:<//=>
+
+Implemented here as infix:// reduces to a PAST node rather than a call.
+
+=cut
+
+.sub 'infix://='
+    .param pmc a
+    .param pmc b
+    $I0 = 'defined'(a)
+    if $I0 goto done
+    'infix:='(a, b)
+  done:
+    .return (a)
+.end
+
+
 .sub '!REDUCEMETAOPCHAIN'
     .param string opname
     .param string identity

Modified: trunk/languages/perl6/src/parser/grammar-oper.pg
==============================================================================
--- trunk/languages/perl6/src/parser/grammar-oper.pg    (original)
+++ trunk/languages/perl6/src/parser/grammar-oper.pg    Mon Jan 19 14:19:34 2009
@@ -143,6 +143,7 @@
 proto infix:<::=> is equiv(infix:<:=>) { ... }
 proto infix:<.=> is equiv(infix:<:=>) { ... }
 proto infix:«=>» is equiv(infix:<:=>) { ... }
+proto infix:<//=> is equiv(infix:<:=>) { ... }
 
 ## loose unary
 proto prefix:<true> is precedence('h=') is subname('true') { ... }

Reply via email to