Skip to content

Commit 7c2cd9b

Browse files
committed
Cleanup after 32736
1 parent 6c3203c commit 7c2cd9b

File tree

2 files changed

+3
-30
lines changed

2 files changed

+3
-30
lines changed

doc/Language/grammars.pod6

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ will always be the number for the currently parsed C<digit> digits.
299299
=head2 Methods in grammars
300300
301301
It's fine to use methods instead of rules or tokens in a grammar, as long
302-
as they return a L<Cursor|/type/Cursor>:
302+
as they return a L<Match|/type/Match>:
303303
304304
grammar DigitMatcher {
305305
method TOP (:$full-unicode) {
@@ -372,8 +372,8 @@ say GrammarAdvice.subparse("use regexes for significant whitespace by default")
372372
Attributes may be defined in grammars. However, they can only be accessed by
373373
methods; in effect, grammars are classes, so these attributes behave in much the
374374
same way as object attributes. Attempting to use them from within a token will
375-
throw an exception because tokens are methods of L<Cursor|/type/Cursor>, not of
376-
the grammar itself; C<Cursor>s, in effect, behave as instances of the class that
375+
throw an exception because tokens are methods of L<Match|/type/Match>, not of
376+
the grammar itself; C<Match>s, in effect, behave as instances of the class that
377377
is the grammar. Note that mutating an attribute from within a method called in a
378378
token will I<only modify the attribute for that token's own match object>!
379379
Grammar attributes can be accessed in the match returned after parsing if made

doc/Type/Cursor.pod6

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,6 @@
99
Initially, it was used to keep track of initial position in regex matches. In
1010
current versions, it's an alias for L<C<Match>|/type/Match>.
1111
12-
=head1 Methods
13-
14-
=head2 method actions
15-
16-
method actions(Cursor:D: --> Mu)
17-
18-
Returns the currently active actions object (or L<Mu|/type/Mu> if none is set).
19-
20-
=head2 method orig
21-
22-
method orig(Cursor:D: --> Any)
23-
24-
Returns the object against which the regex matches.
25-
26-
=head2 method target
27-
28-
method target(Cursor:D: --> Str:D)
29-
30-
Returns a string representation of the object against which the regex matches.
31-
This is the value that the regex engine works with internally.
32-
33-
=head2 method pos
34-
35-
method pos(Cursor:D: --> Int:D)
36-
37-
Returns the current position as a string index into C<Cursor.target>.
38-
3912
=end pod
4013

4114
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6

0 commit comments

Comments
 (0)