summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--src/parser.mly3
-rw-r--r--src/tree.ml2
3 files changed, 7 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index f101eab..eec3e27 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- re-allow $object->state
+- ignore "use feature"
+
Version 1.2.10 - 25 September 2008, by Pascal "Pixel" Rigaux
- recognize "state"
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