diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-10-13 04:45:02 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-10-13 04:45:02 +0000 |
commit | d1ec317d8b4153158bf12d79bfec0a581b7817db (patch) | |
tree | c7be44277c88565c1ab4350d535849c5e642e9aa /perl_checker.src/parser_helper.ml | |
parent | e6798126b96281772d88475d1addfe53f30e42d2 (diff) | |
download | perl_checker-d1ec317d8b4153158bf12d79bfec0a581b7817db.tar perl_checker-d1ec317d8b4153158bf12d79bfec0a581b7817db.tar.gz perl_checker-d1ec317d8b4153158bf12d79bfec0a581b7817db.tar.bz2 perl_checker-d1ec317d8b4153158bf12d79bfec0a581b7817db.tar.xz perl_checker-d1ec317d8b4153158bf12d79bfec0a581b7817db.zip |
- check push arguments
- add a test for pop arguments
Diffstat (limited to 'perl_checker.src/parser_helper.ml')
-rw-r--r-- | perl_checker.src/parser_helper.ml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/perl_checker.src/parser_helper.ml b/perl_checker.src/parser_helper.ml index 0be9353..858dd80 100644 --- a/perl_checker.src/parser_helper.ml +++ b/perl_checker.src/parser_helper.ml @@ -910,6 +910,13 @@ let call_raw force_non_builtin_func (e, para) = | [ List [ Deref(I_array, _) ] ] -> () | _ -> warn_rule (f ^ " is expecting an array and nothing else")) + | "push" | "unshift" -> + (match para with + | Deref(I_array, _) :: l + | [ List (Deref(I_array, _) :: l) ] -> + if l = [] then warn_rule ("you must give some arguments to " ^ f) + | _ -> warn_rule (f ^ " is expecting an array")) + | "system" -> (match un_parenthesize_full_l para with | [ String(l, _) ] -> |