=begin pod

=TITLE class Cursor

=SUBTITLE Internal state of the regex engine during parsing

    class Cursor { }

A C<Cursor> object is used internally by the regex engine in regex matches
to keep track of the current position, backtracking waypoints and information
about capturing groups.

A user-space program usually doesn't need to deal with C<Cursor> objects,
just with their relatives, L<Match> objects.

=head1 Methods

=head2 method orig

    method origin(Cursor:D: --> Any)

Returns the object against which the regex matches.

=head2 method target

    method target(Cursor:D: --> Str:D)

Returns a string representation of the object against which the regex matches.
This is the value that the regex engine works with internally.

=head2 method pos

    method pod(Cursor:D: --> Int:D)

Returns the current position as a string index into `Cursor.target`.

=end pod
