mixinafPegger::RuleCtx
afPegger::RuleCtx
@
Js
(Advanced) Handed to Rule
classes during the matching process.
- currentPos
abstract Int currentPos()
Returns the current position in the underlying input stream.
- eos
abstract Bool eos()
Returns
true
if end-of-stream is reached.- log
Logs the given message to debug. It is formatted to be the same as the other Pegger debug messages.
- parseErr
abstract PegParseErr parseErr(Str errMsg)
Returns a PEG specific
ParseErr
to be thrown.- process
abstract Bool process(Rule rule)
Call to process a sub-rule. Returns
true
if it matched successfully.- readChar
abstract Int readChar()
Consumes 1 character from the underlying input stream.
- rollbackToPos
abstract Void rollbackToPos(Int pos)
Rolls back the underlying input stream to the given position.