diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-12-16 21:17:58 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-12-16 21:17:58 +0000 |
commit | 96c8ec7494eb30ef87e7d3acf8193c5c8bf18cf3 (patch) | |
tree | a918d1a33ec178388c2c197da60835a681c11651 /perl_checker.src/parser_helper.ml | |
parent | 86905dc107c2eaa070465392e3fd5df285204efe (diff) | |
download | perl_checker-96c8ec7494eb30ef87e7d3acf8193c5c8bf18cf3.tar perl_checker-96c8ec7494eb30ef87e7d3acf8193c5c8bf18cf3.tar.gz perl_checker-96c8ec7494eb30ef87e7d3acf8193c5c8bf18cf3.tar.bz2 perl_checker-96c8ec7494eb30ef87e7d3acf8193c5c8bf18cf3.tar.xz perl_checker-96c8ec7494eb30ef87e7d3acf8193c5c8bf18cf3.zip |
- drop internally operator "qw" by rewriting qw(...) into a list of strings
- as a side effect "foo" . qw(bar boo) is now detected
- allow pop(@l) (with explicit parentheses)
Diffstat (limited to 'perl_checker.src/parser_helper.ml')
-rw-r--r-- | perl_checker.src/parser_helper.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perl_checker.src/parser_helper.ml b/perl_checker.src/parser_helper.ml index 1a54536..a7d48f1 100644 --- a/perl_checker.src/parser_helper.ml +++ b/perl_checker.src/parser_helper.ml @@ -409,7 +409,6 @@ let check_ternary_paras(cond, a, b) = | Num _ | Raw_string _ | String ([(_, List [])], _) - | Call_op("qw", _, _) -> true | Call(Deref(I_func, Ident(None, "N", _)), [ List(String _ :: l) ]) | Call_op(".", l, _) @@ -826,7 +825,8 @@ let call_raw force_non_builtin_func (e, para) = | "pop" | "shift" -> (match para with | [] - | [ Deref(I_array, _) ] -> () + | [ Deref(I_array, _) ] + | [ List [ Deref(I_array, _) ] ] -> () | _ -> warn_rule (f ^ " is expecting an array and nothing else")) ; None | _ -> None |