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

[svn:parrot] r35431 - trunk/languages/perl6/src/parser

From:
pmichaud
Date:
January 11, 2009 19:15
Subject:
[svn:parrot] r35431 - trunk/languages/perl6/src/parser
Message ID:
20090112031505.A9447CB9F9@x12.develooper.com
Author: pmichaud
Date: Sun Jan 11 19:15:00 2009
New Revision: 35431

Modified:
   trunk/languages/perl6/src/parser/actions.pm

Log:
[rakudo]:  Throw an exception for bare "say" or "print" (RT #62028).


Modified: trunk/languages/perl6/src/parser/actions.pm
==============================================================================
--- trunk/languages/perl6/src/parser/actions.pm	(original)
+++ trunk/languages/perl6/src/parser/actions.pm	Sun Jan 11 19:15:00 2009
@@ -2081,8 +2081,12 @@
 
 
 method term($/, $key) {
+    my $name := ~$<name>;
     my $past;
     if $key eq 'noarg' {
+        if $name eq 'print' || $name eq 'say' {
+            $/.panic($name ~ ' requires an argument');
+        }
         $past := PAST::Op.new( :name( ~$<name> ), :pasttype('call') );
     }
     elsif $key eq 'args' {



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