From 4611603ba48e9aeadd91d17d14795ee92cf5898b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 10 Apr 2003 19:08:33 +0000 Subject: correctly (in Perl way) handle priority for some special unary functions (length, exists, ref) --- perl_checker.src/parser_helper.ml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'perl_checker.src/parser_helper.ml') 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) = -- cgit v1.2.1