diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-09-25 13:56:58 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-09-25 13:56:58 +0000 |
commit | 7a8ee73958d286f277736821f996fb9b83673f3f (patch) | |
tree | 0f06e5f794e8a80c6bff03d7e4ad32b97e4bac8d /src | |
parent | f5d62c8ed838a33ee14b5ece7c822019f0714b3a (diff) | |
download | perl_checker-7a8ee73958d286f277736821f996fb9b83673f3f.tar perl_checker-7a8ee73958d286f277736821f996fb9b83673f3f.tar.gz perl_checker-7a8ee73958d286f277736821f996fb9b83673f3f.tar.bz2 perl_checker-7a8ee73958d286f277736821f996fb9b83673f3f.tar.xz perl_checker-7a8ee73958d286f277736821f996fb9b83673f3f.zip |
- re-allow $object->state - ignore "use feature"
Diffstat (limited to 'src')
-rw-r--r-- | src/parser.mly | 3 | ||||
-rw-r--r-- | src/tree.ml | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/parser.mly b/src/parser.mly index 78fb461..dd36707 100644 --- a/src/parser.mly +++ b/src/parser.mly @@ -346,6 +346,9 @@ term: | term ARROW word_or_scalar parenthesized {sp_0($2); sp_0($3); sp_0($4); if $4.any.expr = [] then warn [Warn_suggest_simpler] $4.pos "remove these unneeded parentheses"; new_pesp M_unknown P_tok (to_Method_call($1.any.expr, $3.any, $4.any.expr)) $1 $4} /* $foo->bar(list) */ | term ARROW word_or_scalar {sp_0($2); sp_0($3); new_pesp M_unknown P_tok (to_Method_call($1.any.expr, $3.any, [])) $1 $3} /* $foo->bar */ +| term ARROW MY_OUR parenthesized {sp_0($2); sp_0($3); sp_0($4); if $4.any.expr = [] then warn [Warn_suggest_simpler] $4.pos "remove these unneeded parentheses"; new_pesp M_unknown P_tok (to_Method_call($1.any.expr, Ident(None, $3.any, get_pos $3), $4.any.expr)) $1 $4} /* $foo->bar(list) */ +| term ARROW MY_OUR {sp_0($2); sp_0($3); new_pesp M_unknown P_tok (to_Method_call($1.any.expr, Ident(None, $3.any, get_pos $3), [])) $1 $3} /* $foo->bar */ + | NEW word { sp_n($2); new_pesp (M_ref M_unknown) P_expr (to_Method_call ($2.any, Ident(None, "new", get_pos $1), [])) $1 $2} /* new Class */ | NEW word_paren parenthesized { sp_n($2); sp_0($3); new_pesp (M_ref M_unknown) P_expr (to_Method_call($2.any, Ident(None, "new", get_pos $1), $3.any.expr)) $1 $3} /* new Class(...) */ | NEW word terminal { die_rule "you must parenthesize parameters: \"new Class(...)\" instead of \"new Class ...\"" } diff --git a/src/tree.ml b/src/tree.ml index f21b9c1..d0faf80 100644 --- a/src/tree.ml +++ b/src/tree.ml @@ -176,7 +176,7 @@ let get_exported t = ) empty_exports t let uses_external_package = function - | "vars" | "Exporter" | "diagnostics" | "strict" | "warnings" | "lib" | "POSIX" | "Gtk" | "Storable" + | "vars" | "Exporter" | "diagnostics" | "strict" | "feature" | "warnings" | "lib" | "POSIX" | "Gtk" | "Storable" | "Config" | "Socket" | "IO::Socket" | "DynaLoader" | "Data::Dumper" | "Time::localtime" | "Expect" -> true | _ -> false |