diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-04-17 11:38:51 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-04-17 11:38:51 +0000 |
commit | 872810e1e03dc99f39d1a0aecb2081e3894ec8f4 (patch) | |
tree | caa0af546d49e4c4a137ebaffc2a4e50f64ed9bc /perl_checker.src/parser_helper.ml | |
parent | 6e2837dcdd4dff544631e3957ec57e91481a5490 (diff) | |
download | perl-MDK-Common-872810e1e03dc99f39d1a0aecb2081e3894ec8f4.tar perl-MDK-Common-872810e1e03dc99f39d1a0aecb2081e3894ec8f4.tar.gz perl-MDK-Common-872810e1e03dc99f39d1a0aecb2081e3894ec8f4.tar.bz2 perl-MDK-Common-872810e1e03dc99f39d1a0aecb2081e3894ec8f4.tar.xz perl-MDK-Common-872810e1e03dc99f39d1a0aecb2081e3894ec8f4.zip |
basic "number of arguments" checking
Diffstat (limited to 'perl_checker.src/parser_helper.ml')
-rw-r--r-- | perl_checker.src/parser_helper.ml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/perl_checker.src/parser_helper.ml b/perl_checker.src/parser_helper.ml index 0092a9f..db6182c 100644 --- a/perl_checker.src/parser_helper.ml +++ b/perl_checker.src/parser_helper.ml @@ -41,11 +41,12 @@ let is_var_number_match = function let non_scalar_context context = context = I_hash || context = I_array let is_scalar_context context = context = I_scalar -let is_not_a_scalar = function +let rec is_not_a_scalar = function | Deref_with(_, context, _, _) | Deref(context, _) -> non_scalar_context context | List [] | List(_ :: _ :: _) -> true + | Call_op("?:", [ _cond ; a; b ], _) -> is_not_a_scalar a || is_not_a_scalar b | _ -> false let is_not_a_scalar_or_array = function |