summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/parser_helper.ml
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-04-17 11:38:51 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-04-17 11:38:51 +0000
commit872810e1e03dc99f39d1a0aecb2081e3894ec8f4 (patch)
treecaa0af546d49e4c4a137ebaffc2a4e50f64ed9bc /perl_checker.src/parser_helper.ml
parent6e2837dcdd4dff544631e3957ec57e91481a5490 (diff)
downloadperl-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.ml3
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