develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35774 - in trunk/languages/perl6/src: builtins parser

From:
jonathan
Date:
January 19, 2009 14:19
Subject:
[svn:parrot] r35774 - in trunk/languages/perl6/src: builtins parser
Message ID:
20090119221934.E299DCB9AE@x12.develooper.com
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') { ... }



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About