summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/parser.mly
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-04-15 21:20:00 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-04-15 21:20:00 +0000
commit293167fe02578bfc2d12e9b26ff0e5ca6e205dbe (patch)
treebabdbe387c903a9e9a179f61935d601746a5a4b0 /perl_checker.src/parser.mly
parentb11cd56179401e20be410ebf6a0e86a12322bed7 (diff)
downloadperl-MDK-Common-293167fe02578bfc2d12e9b26ff0e5ca6e205dbe.tar
perl-MDK-Common-293167fe02578bfc2d12e9b26ff0e5ca6e205dbe.tar.gz
perl-MDK-Common-293167fe02578bfc2d12e9b26ff0e5ca6e205dbe.tar.bz2
perl-MDK-Common-293167fe02578bfc2d12e9b26ff0e5ca6e205dbe.tar.xz
perl-MDK-Common-293167fe02578bfc2d12e9b26ff0e5ca6e205dbe.zip
forbid "unless (...) { ... } else { ... }" and "unless (...) { ... } elsif (...) { ... }
Diffstat (limited to 'perl_checker.src/parser.mly')
-rw-r--r--perl_checker.src/parser.mly2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl_checker.src/parser.mly b/perl_checker.src/parser.mly
index f578f4d..0b27e80 100644
--- a/perl_checker.src/parser.mly
+++ b/perl_checker.src/parser.mly
@@ -117,7 +117,7 @@ line:
if_then_else: /* Real conditional expressions */
| IF PAREN expr PAREN_END BRACKET lines BRACKET_END elsif else_ {sp_p($1); sp_n($2); sp_0($3); sp_0_or_cr($4); sp_p($5); mcontext_check M_scalar $3; check_block_sub $6 $7; to_Call_op (if $9.any = [] then M_none else mcontext_lmerge ($6.mcontext :: mcontext_lmaybe $8 @ [$9.mcontext])) "if" (prio_lo P_loose $3 :: Block $6.any :: $8.any @ $9.any) $1 $9}
-| UNLESS PAREN expr PAREN_END BRACKET lines BRACKET_END elsif else_ {sp_p($1); sp_n($2); sp_0($3); sp_0_or_cr($4); sp_p($5); mcontext_check M_scalar $3; check_block_sub $6 $7; to_Call_op M_none "unless" (prio_lo P_loose $3 :: Block $6.any :: $8.any @ $9.any) $1 $9}
+| UNLESS PAREN expr PAREN_END BRACKET lines BRACKET_END elsif else_ {sp_p($1); sp_n($2); sp_0($3); sp_0_or_cr($4); sp_p($5); mcontext_check M_scalar $3; check_block_sub $6 $7; check_unless_else $8 $9; to_Call_op M_none "unless" (prio_lo P_loose $3 :: Block $6.any :: $8.any @ $9.any) $1 $9}
elsif:
| {default_esp []}