diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-12-16 21:38:49 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-12-16 21:38:49 +0000 |
commit | 458ac90b28f7e9646fafe2a1213a3d6d2240063a (patch) | |
tree | 2bef1926b37359a8af24d40f95116b516e63e1f8 /perl_checker.src/parser.mly | |
parent | f9d1e0c2bd806c577aa2d94acc8338eb3b1c9360 (diff) | |
download | perl-MDK-Common-458ac90b28f7e9646fafe2a1213a3d6d2240063a.tar perl-MDK-Common-458ac90b28f7e9646fafe2a1213a3d6d2240063a.tar.gz perl-MDK-Common-458ac90b28f7e9646fafe2a1213a3d6d2240063a.tar.bz2 perl-MDK-Common-458ac90b28f7e9646fafe2a1213a3d6d2240063a.tar.xz perl-MDK-Common-458ac90b28f7e9646fafe2a1213a3d6d2240063a.zip |
nice error message instead of syntax error in: map { $_ } /re/ ? 1 : 2
Diffstat (limited to 'perl_checker.src/parser.mly')
-rw-r--r-- | perl_checker.src/parser.mly | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/perl_checker.src/parser.mly b/perl_checker.src/parser.mly index 71f8ac0..ebdf59d 100644 --- a/perl_checker.src/parser.mly +++ b/perl_checker.src/parser.mly @@ -321,6 +321,7 @@ term: | func parenthesized {sp_0($2); call_func $1 $2} /* &foo(@args) */ | word argexpr {check_parenthesized_first_argexpr_with_Ident $1.any $2; call_no_paren $1 $2} /* foo $a, $b */ +| word BRACKET lines BRACKET_END MULT { die_with_rawpos $5.pos "I can't handle this correctly, please add parentheses" } | word BRACKET lines BRACKET_END COMMA argexpr %prec LSTOP {sp_n($2); new_pesp M_unknown P_call_no_paren (call(Deref(I_func, $1.any), Ref(I_hash, List $3.any) :: $6.any.expr)) $1 $6} /* bless { foo }, $bar */ | word_paren parenthesized {sp_0($2); call_with_paren $1 $2} /* foo(@args) */ | word BRACKET lines BRACKET_END listexpr %prec LSTOP {sp_n($2); check_block_sub $3 $4; call_and_context(Deref(I_func, $1.any), anonymous_sub None $3 :: $5.any.expr) false (if $5.any.expr = [] then P_tok else P_call_no_paren) $1 $5} /* map { foo } @bar */ |