develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34305 - trunk/languages/perl6/src/builtins

From:
pmichaud
Date:
December 23, 2008 17:12
Subject:
[svn:parrot] r34305 - trunk/languages/perl6/src/builtins
Message ID:
20081224011237.23D3CCBA12@x12.develooper.com
Author: pmichaud
Date: Tue Dec 23 17:12:36 2008
New Revision: 34305

Modified:
   trunk/languages/perl6/src/builtins/control.pir

Log:
[rakudo]:  Merge 'last' and 'redo' functions from pctloop2 branch.


Modified: trunk/languages/perl6/src/builtins/control.pir
==============================================================================
--- trunk/languages/perl6/src/builtins/control.pir	(original)
+++ trunk/languages/perl6/src/builtins/control.pir	Tue Dec 23 17:12:36 2008
@@ -118,6 +118,14 @@
 
 =cut
 
+.sub 'last'
+    .local pmc e
+    e = new 'Exception'
+    e['severity'] = .EXCEPT_NORMAL
+    e['type'] = .CONTROL_LOOP_LAST
+    throw e
+.end
+
 .sub 'next'
     .local pmc e
     e = new 'Exception'
@@ -126,6 +134,14 @@
     throw e
 .end
 
+.sub 'redo'
+    .local pmc e
+    e = new 'Exception'
+    e['severity'] = .EXCEPT_NORMAL
+    e['type'] = .CONTROL_LOOP_REDO
+    throw e
+.end
+
 .sub 'continue'
     .local pmc e
     e = new 'Exception'



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