summaryrefslogtreecommitdiff
path: root/perly.y
diff options
context:
space:
mode:
authorVincent Pit <perl@profvince.com>2009-03-24 21:49:14 +0100
committerVincent Pit <perl@profvince.com>2009-03-28 13:59:47 +0100
commitf20dcd76e7f64bd1c2ec35b4fa66b6376190e3f4 (patch)
tree299ac867894e385143e872891714f056280680fb /perly.y
parentb11720532d118951e85d8a680330b826a6ab4227 (diff)
downloadperl-f20dcd76e7f64bd1c2ec35b4fa66b6376190e3f4.tar.gz
Allow when to be used as a statement modifier
Diffstat (limited to 'perly.y')
-rw-r--r--perly.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/perly.y b/perly.y
index aad4dd7729..c07f48a4d3 100644
--- a/perly.y
+++ b/perly.y
@@ -269,6 +269,8 @@ sideff : error
(OP*)NULL, $3, $1, (OP*)NULL);
TOKEN_GETMAD($2,((LISTOP*)$$)->op_first->op_sibling,'w');
}
+ | expr WHEN expr
+ { $$ = newWHENOP($3, scope($1)); }
;
/* else and elsif blocks */