diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-05-26 15:16:45 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-05-26 15:16:45 +0000 |
commit | 4f31002f96c7f117d65e333cf46790c5f33de755 (patch) | |
tree | 6d96f60047fd6e74ee568ef8b411543dc7e46136 | |
parent | 05eb4216c7614de17622622f4bc9774645acc0f0 (diff) | |
download | perl-MDK-Common-4f31002f96c7f117d65e333cf46790c5f33de755.tar perl-MDK-Common-4f31002f96c7f117d65e333cf46790c5f33de755.tar.gz perl-MDK-Common-4f31002f96c7f117d65e333cf46790c5f33de755.tar.bz2 perl-MDK-Common-4f31002f96c7f117d65e333cf46790c5f33de755.tar.xz perl-MDK-Common-4f31002f96c7f117d65e333cf46790c5f33de755.zip |
simplify
-rw-r--r-- | perl_checker.src/parser.mly | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/perl_checker.src/parser.mly b/perl_checker.src/parser.mly index a2b3bc1..36d8a74 100644 --- a/perl_checker.src/parser.mly +++ b/perl_checker.src/parser.mly @@ -330,10 +330,6 @@ term: | term 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_pesp M_unknown P_tok (to_Method_call($1.any.expr, $3.any, $4.any.expr)) $1 $4} /* $foo->bar(list) */ | term ARROW word_or_scalar {sp_0($2); sp_0($3); new_pesp M_unknown P_tok (to_Method_call($1.any.expr, $3.any, [])) $1 $3} /* $foo->bar */ -| term ARROW MULT_L_STR parenthesized {sp_0($2); sp_0($3); sp_0($4); new_pesp M_unknown P_tok (to_Method_call($1.any.expr, Ident(None, "x", get_pos $3), $4.any.expr)) $1 $4} /* $foo->bar(list) */ -| term ARROW MULT_L_STR {sp_0($2); sp_0($3); new_pesp M_unknown P_tok (to_Method_call($1.any.expr, Ident(None, "x", get_pos $3), [])) $1 $3} /* $foo->bar */ -| term ARROW FOR parenthesized {sp_0($2); sp_0($3); sp_0($4); new_pesp M_unknown P_tok (to_Method_call($1.any.expr, Ident(None, $3.any, get_pos $3), $4.any.expr)) $1 $4} /* $foo->bar(list) */ -| term ARROW FOR {sp_0($2); sp_0($3); new_pesp M_unknown P_tok (to_Method_call($1.any.expr, Ident(None, $3.any, get_pos $3), [])) $1 $3} /* $foo->bar */ | NEW word { sp_n($2); new_pesp (M_ref M_unknown) P_call_no_paren (to_Method_call ($2.any, Ident(None, "new", get_pos $1), [])) $1 $2} /* new Class */ | NEW word_paren parenthesized { sp_n($2); sp_0($3); new_pesp (M_ref M_unknown) P_call_no_paren (to_Method_call($2.any, Ident(None, "new", get_pos $1), $3.any.expr)) $1 $3} /* new Class(...) */ @@ -450,6 +446,8 @@ word_or_scalar: | word {$1} | scalar {$1} | word_paren {$1} +| MULT_L_STR { new_1esp (Ident(None, "x", get_pos $1)) $1 } +| FOR { new_1esp (Ident(None, $1.any, get_pos $1)) $1 } bareword: | NEW { new_1esp (Ident(None, "new", get_pos $1)) $1 } |