From 599c7e0ed6b95c9f77500d54fc4d06d9991adeef Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 17 Apr 2003 11:38:51 +0000 Subject: basic "number of arguments" checking --- perl_checker.src/parser_helper.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (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 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 -- cgit v1.2.1