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

[svn:parrot] r34741 - in trunk/languages/pipp: src/pct t/php

From:
bernhard
Date:
January 1, 2009 06:35
Subject:
[svn:parrot] r34741 - in trunk/languages/pipp: src/pct t/php
Message ID:
20090101143552.7D84FCBA08@x12.develooper.com
Author: bernhard
Date: Thu Jan  1 06:35:51 2009
New Revision: 34741

Modified:
   trunk/languages/pipp/src/pct/grammar.pg
   trunk/languages/pipp/t/php/closures.t

Log:
[Pipp] In closure definition, the bound params come after the regular params.


Modified: trunk/languages/pipp/src/pct/grammar.pg
==============================================================================
--- trunk/languages/pipp/src/pct/grammar.pg	(original)
+++ trunk/languages/pipp/src/pct/grammar.pg	Thu Jan  1 06:35:51 2009
@@ -395,7 +395,7 @@
 
 # declarations
 rule closure {
-    'function' <bind_list>? <param_list> 
+    'function' <param_list> <bind_list>?
     {*}                                     #= open
     '{' <statement_list> '}'
     {*}                                     #= close

Modified: trunk/languages/pipp/t/php/closures.t
==============================================================================
--- trunk/languages/pipp/t/php/closures.t	(original)
+++ trunk/languages/pipp/t/php/closures.t	Thu Jan  1 06:35:51 2009
@@ -133,7 +133,7 @@
 
 function gen_indentor ( ) {
     $indention = ' ';
-    $indentor = function use ($indention) ($line)  {
+    $indentor = function ($line) use ($indention) {
         echo $indention . $line . "\n";
     };
 
@@ -159,7 +159,7 @@
 
 function gen_indentor ( $indention ) {
 
-    $indentor = function use ($indention) ($line)  {
+    $indentor = function ($line) use ($indention) {
         echo $indention . $line . "\n";
     };
 



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