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

[svn:parrot] r34303 - branches/pctloop2/languages/perl6/src/builtins

From:
pmichaud
Date:
December 23, 2008 16:37
Subject:
[svn:parrot] r34303 - branches/pctloop2/languages/perl6/src/builtins
Message ID:
20081224003721.3C751CBA12@x12.develooper.com
Author: pmichaud
Date: Tue Dec 23 16:37:19 2008
New Revision: 34303

Modified:
   branches/pctloop2/languages/perl6/src/builtins/control.pir

Log:
[rakudo]:  Add simple 'last' and 'redo' functions.


Modified: branches/pctloop2/languages/perl6/src/builtins/control.pir
==============================================================================
--- branches/pctloop2/languages/perl6/src/builtins/control.pir	(original)
+++ branches/pctloop2/languages/perl6/src/builtins/control.pir	Tue Dec 23 16:37:19 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