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";
};