diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-10-01 14:01:39 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-10-01 14:01:39 +0000 |
commit | a1634a944d55f743bfffcae7aba2616592bd53c4 (patch) | |
tree | e94fb5ea79dfba26a3a2bfa726dbbaa72c594cba | |
parent | 19f67f9d87a54595f6124c14cc9cd9446fe9d6f6 (diff) | |
download | perl-MDK-Common-a1634a944d55f743bfffcae7aba2616592bd53c4.tar perl-MDK-Common-a1634a944d55f743bfffcae7aba2616592bd53c4.tar.gz perl-MDK-Common-a1634a944d55f743bfffcae7aba2616592bd53c4.tar.bz2 perl-MDK-Common-a1634a944d55f743bfffcae7aba2616592bd53c4.tar.xz perl-MDK-Common-a1634a944d55f743bfffcae7aba2616592bd53c4.zip |
allow: -f $a{b}->c
-rw-r--r-- | perl_checker.src/parser.mly | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/perl_checker.src/parser.mly b/perl_checker.src/parser.mly index 1490611..eb6e99a 100644 --- a/perl_checker.src/parser.mly +++ b/perl_checker.src/parser.mly @@ -388,6 +388,9 @@ restricted_subscripted: /* Some kind of subscripted expression */ | restricted_subscripted arrayref {sp_0($2); new_esp M_scalar (to_Deref_with(I_array, I_scalar, $1.any, only_one_array_ref $2)) $1 $2} /* $foo->[$bar][$baz] */ | restricted_subscripted parenthesized {sp_0($2); new_esp M_unknown (to_Deref_with(I_func , I_scalar, $1.any, List($2.any.expr))) $1 $2} /* $foo->{bar}(@args) */ +| restricted_subscripted ARROW word_or_scalar parenthesized {sp_0($2); sp_0($3); sp_0($4); if $4.any.expr = [] then warn $4.pos "remove these unneeded parentheses"; new_esp M_unknown (to_Method_call($1.any, $3.any, $4.any.expr)) $1 $4} /* $foo->bar(list) */ +| restricted_subscripted ARROW word_or_scalar {sp_0($2); sp_0($3); new_esp M_unknown (to_Method_call($1.any, $3.any, [])) $1 $3} /* $foo->bar */ + arrayref: | arrayref_start ARRAYREF_END {sp_0($2); new_esp (M_ref M_array) $1.any $1 $2} | arrayref_start expr ARRAYREF_END {sp_0($3); new_esp (M_ref M_array) ($1.any @ [$2.any.expr]) $1 $3} |