diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-04-10 19:08:33 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-04-10 19:08:33 +0000 |
commit | 4611603ba48e9aeadd91d17d14795ee92cf5898b (patch) | |
tree | 48c30f8959ab8edd7631fa7f3ccc54ae5b7eabd6 /perl_checker.src/parser_helper.ml | |
parent | 9b204c4fd2e13cf7e406e29a2df78c8545b02730 (diff) | |
download | perl_checker-4611603ba48e9aeadd91d17d14795ee92cf5898b.tar perl_checker-4611603ba48e9aeadd91d17d14795ee92cf5898b.tar.gz perl_checker-4611603ba48e9aeadd91d17d14795ee92cf5898b.tar.bz2 perl_checker-4611603ba48e9aeadd91d17d14795ee92cf5898b.tar.xz perl_checker-4611603ba48e9aeadd91d17d14795ee92cf5898b.zip |
correctly (in Perl way) handle priority for some special unary functions (length, exists, ref)
Diffstat (limited to 'perl_checker.src/parser_helper.ml')
-rw-r--r-- | perl_checker.src/parser_helper.ml | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/perl_checker.src/parser_helper.ml b/perl_checker.src/parser_helper.ml index 0c817ad..9b5269f 100644 --- a/perl_checker.src/parser_helper.ml +++ b/perl_checker.src/parser_helper.ml @@ -723,16 +723,11 @@ let call_one_scalar_para (e, (_, pos)) para = let para = match para with | [] -> - warn_rule (sprintf "please use \"%s $_\" instead of \"%s\"" e e) ; + if not (List.mem e [ "length" ]) then warn_rule (sprintf "please use \"%s $_\" instead of \"%s\"" e e) ; [var_dollar_ (raw_pos2pos pos)] | _ -> para in - let pri = - match e with - | "defined" -> P_expr - | _ -> P_add - in - pri, call(Deref(I_func, Ident(None, e, raw_pos2pos pos)), para) + P_mul, call(Deref(I_func, Ident(None, e, raw_pos2pos pos)), para) let call_op_if_infix left right (sp, pos) = |