classafPegger::Match

sys::Obj
  afPegger::Match

@Js

Represents a PEG match result.

data

Source

[Str:Obj?]? data

Storage for user data - use when investigating match results.

dump

Source

This dump()

Dumps the matched tree to std-out. Useful for debugging.

dumpToStr

Source

Str dumpToStr()

Returns the matched tree as a string.

firstMatch

Source

Match firstMatch()

Returns the first sub-match.

getMatch

Source

@Operator
Match? getMatch(Str name)

Returns the first sub-match with the given rule name (or label).

getMatchAt

Source

@Operator
Match? getMatchAt(Int index)

Returns the sub-match at the given index.

matched

Source

Str matched()

Returns the matched string.

matchedRange

Source

Range matchedRange()

Returns the matched range.

matches

Source

Match[] matches()

Returns all sub-mataches.

name

Source

Str? name()

Returns the associated rule name.

parent

Source

Match? parent()

Returns the parent Match in the tree, or null if this is the root.

rule

Source

Rule rule()

Returns the rule associated with this match.