diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-12-18 16:02:09 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-12-18 16:02:09 +0000 |
commit | 1e9b027b5bb760a1b15d76a7b4574052853930e0 (patch) | |
tree | cd7b06bac95a507a11842d50d837392d23b8b108 /perl_checker.src/parser_helper.ml | |
parent | 00cbf7c47c0f642a9fe3d6b0189ed1ed642564e6 (diff) | |
download | perl-MDK-Common-1e9b027b5bb760a1b15d76a7b4574052853930e0.tar perl-MDK-Common-1e9b027b5bb760a1b15d76a7b4574052853930e0.tar.gz perl-MDK-Common-1e9b027b5bb760a1b15d76a7b4574052853930e0.tar.bz2 perl-MDK-Common-1e9b027b5bb760a1b15d76a7b4574052853930e0.tar.xz perl-MDK-Common-1e9b027b5bb760a1b15d76a7b4574052853930e0.zip |
new features including checking methods being available and unused functions
Diffstat (limited to 'perl_checker.src/parser_helper.ml')
-rw-r--r-- | perl_checker.src/parser_helper.ml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/perl_checker.src/parser_helper.ml b/perl_checker.src/parser_helper.ml index e70e94f..19ee2da 100644 --- a/perl_checker.src/parser_helper.ml +++ b/perl_checker.src/parser_helper.ml @@ -389,7 +389,11 @@ let to_List = function let deref_arraylen e = Call(Deref(I_func, Ident(None, "int", raw_pos2pos bpos)), [Deref(I_array, e)]) let to_Ident ((fq, name), (_, pos)) = Ident(fq, name, raw_pos2pos pos) let to_Raw_string (s, (_, pos)) = Raw_string(s, raw_pos2pos pos) -let to_Method_call (object_, method_, para) = Method_call(maybe_to_Raw_string object_, maybe_to_Raw_string method_, para) +let to_Method_call (object_, method_, para) = + match method_ with + | Ident(Some "SUPER", name, pos) -> Method_call(maybe_to_Raw_string object_, Raw_string(name, pos), para) + | Ident(Some _, _, _) -> Call(Deref(I_func, method_), maybe_to_Raw_string object_ :: para) + | _ -> Method_call(maybe_to_Raw_string object_, maybe_to_Raw_string method_, para) let to_Deref_with(from_context, to_context, ref_, para) = if is_not_a_scalar ref_ then warn_rule "bad deref"; Deref_with(from_context, to_context, ref_, para) |