[svn:parrot] r47629 - branches/gsoc_past_optimization/docs/pct/pattern
tcurtis at svn.parrot.org
tcurtis at svn.parrot.org
Mon Jun 14 23:04:00 UTC 2010
Author: tcurtis
Date: Mon Jun 14 23:04:00 2010
New Revision: 47629
URL: https://trac.parrot.org/parrot/changeset/47629
Log:
Add docs for .ACCEPTSGLOBALLY and .ACCEPTSEXACTLY.
Modified:
branches/gsoc_past_optimization/docs/pct/pattern/past_pattern.pod
Modified: branches/gsoc_past_optimization/docs/pct/pattern/past_pattern.pod
==============================================================================
--- branches/gsoc_past_optimization/docs/pct/pattern/past_pattern.pod Mon Jun 14 19:56:27 2010 (r47628)
+++ branches/gsoc_past_optimization/docs/pct/pattern/past_pattern.pod Mon Jun 14 23:04:00 2010 (r47629)
@@ -33,14 +33,30 @@
=back
+=head2 Subclass Methods
+
+The following method should be implemented in any subclass, as C<.ACCEPTS> relies on it.
+
+=over 4
+
+=item C<ACCEPTSEXACTLY(I<node>)>
+
+Tests whether the specific node matches the pattern without recursing into children. The result should be a PAST::Pattern::Match object. Every PAST::Pattern subclass B<MUST> implement this method.
+
+=back
+
=head2 Internal Methods
=over 4
-=item attr($name, $value, $has_value)
+=item C<attr(I<name>, I<value>, I<has_value>)>
A helper method for defining attribute accessors.
+=item C<ACCEPTSGLOBALLY(I<node>)
+
+Used by C<ACCEPTS> to implement global matching.
+
=back
=head1 SEE ALSO
More information about the parrot-commits
mailing list