Struct pidgin::Match[][src]

pub struct Match<'t> { /* fields omitted */ }

This is a node in a parse tree. It is functionally similar to regex::Match, in fact providing much the same API, but unlike a regex::Match a pidgin::Match always corresponds to some rule, it knows what rule it corresponds to, and it records any sub-matches involved in its parsing.

The lifetime parameter 't represents the lifetime of the &str matched against.

Methods

impl<'t> Match<'t>
[src]

Returns the matched text.

Returns the starting offset of the match.

Returns the ending offset of the match.

Returns the grammar rule matched.

Returns the sub-matches of this match, if any.

Returns the first Match defined by the given rule under this parse node searching recursively, depth-first, left-to-right.

Returns all Matches matching the given rule in the parse tree under this node. Matches are ordered as found by a depth-first left-to-right search of the parse tree.

Trait Implementations

impl<'t> Debug for Match<'t>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'t> Send for Match<'t>

impl<'t> Sync for Match<'t>