classafPegger::PegCtx
sys::Obj afPegger::PegCtx
Handed to Rule
classes during the matching process.
Only needed when you're implementing your own rules.
- log
Logs the given message to debug. It is formatted to be the same as the other Pegger debug messages.
- matched
Str? matched
A rule should
set
this when it has matched some input. It should not re-set what has been matched in inner rules, only what it, itself, has matched.Getting
also returns the concatenation of what any inner rules have matched.- process
Call to process a sub-rule.
- read
Reads
n
characters from the underlying input stream.- readChar
Int? readChar()
Reads 1 character from the underlying input stream.
- rollback
Void rollback(Str msg := "Rolling back")
Call to rollback the matching of any subrules.
- unread
Pushes back, or un-reads, the given string onto the underlying input stream. Use when rolling back a rule.