summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/parser.mly
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-01-16 13:31:19 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-01-16 13:31:19 +0000
commitce11b3962914f3d82a64738c1a2a14c8c756d3a4 (patch)
tree9e887ca79f3eb2a5a10caa48f620f451f65610bb /perl_checker.src/parser.mly
parentf42df61f5ac0c22a9283b2cd0feac70a602eac5c (diff)
downloadperl_checker-ce11b3962914f3d82a64738c1a2a14c8c756d3a4.tar
perl_checker-ce11b3962914f3d82a64738c1a2a14c8c756d3a4.tar.gz
perl_checker-ce11b3962914f3d82a64738c1a2a14c8c756d3a4.tar.bz2
perl_checker-ce11b3962914f3d82a64738c1a2a14c8c756d3a4.tar.xz
perl_checker-ce11b3962914f3d82a64738c1a2a14c8c756d3a4.zip
- perl_checker:
- check occurences of "$foo ? $foo : $bar" - disallow "fq::f args" when args is not parenthesized
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 84655eb..47aebfe 100644
--- a/perl_checker.src/parser.mly
+++ b/perl_checker.src/parser.mly
@@ -288,7 +288,7 @@ term:
/* function_calls */
| func parenthesized {sp_0($2); (P_tok, call_func true (fst $1, sndfst $2)), sp_pos_range $1 $2} /* &foo(@args) */
-| word argexpr {check_parenthesized_first_argexpr (string_of_Ident (fst $1)) $2; (P_call_no_paren, call(Deref(I_func, fst $1), sndfst $2)), sp_pos_range $1 $2} /* foo $a, $b */
+| word argexpr {check_parenthesized_first_argexpr_with_Ident (fst $1) $2; (P_call_no_paren, call(Deref(I_func, fst $1), sndfst $2)), sp_pos_range $1 $2} /* foo $a, $b */
| word_paren parenthesized {sp_0($2); (P_tok, call(Deref(I_func, fst $1), sndfst $2)), sp_pos_range $1 $2} /* foo(@args) */
| word BRACKET lines BRACKET_END listexpr %prec LSTOP {sp_n($2); check_block_sub $3 $4; ((if sndfst $5 = [] then P_tok else P_call_no_paren), call(Deref(I_func, fst $1), anonymous_sub $3 :: sndfst $5)), sp_pos_range $1 $5} /* map { foo } @bar */
| word BRACKET BRACKET expr BRACKET_END BRACKET_END listexpr %prec LSTOP {sp_n($2); sp_p($3); sp_p($4); sp_p($5); sp_p($6); ((if sndfst $7 = [] then P_tok else P_call_no_paren), call(Deref(I_func, fst $1), anonymous_sub([ Ref(I_hash, sndfst $4) ], snd $4) :: sndfst $7)), sp_pos_range $1 $7} /* map { { foo } } @bar */