summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/parser_helper.ml
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-04-10 19:08:33 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-04-10 19:08:33 +0000
commit46c3e5570a14d47c55c04f71c65ea9f01b806d76 (patch)
tree175d6e09a26c700de6e221f5f511469596eec350 /perl_checker.src/parser_helper.ml
parent9dc403e0f6777f48eccc28d033b32881df57c521 (diff)
downloadperl-MDK-Common-46c3e5570a14d47c55c04f71c65ea9f01b806d76.tar
perl-MDK-Common-46c3e5570a14d47c55c04f71c65ea9f01b806d76.tar.gz
perl-MDK-Common-46c3e5570a14d47c55c04f71c65ea9f01b806d76.tar.bz2
perl-MDK-Common-46c3e5570a14d47c55c04f71c65ea9f01b806d76.tar.xz
perl-MDK-Common-46c3e5570a14d47c55c04f71c65ea9f01b806d76.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.ml9
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) =