struct Pars::ParseContext
- Pars::ParseContext
- Struct
- Value
- Object
Overview
A struct containing information about a parsing context. Used to chain Parsers together and retain input position.
Defined in:
pars/parse_context.crConstructors
Instance Method Summary
-
#byte : UInt8
Provides the parse head as a byte.
-
#char : Char
Provides the parse head as a
Char
. -
#exhausted? : Bool
true
if all of the input has been consumed. -
#head : Char | UInt8
Provide the current parse head directly.
-
#input : String | Bytes
The input the parser is working across.
-
#next(offset = 1) : ParseContext
Creates a new context at the next parse position.
-
#pos : Int32
The correct parse offset within input.
-
#to_s(io : IO)
Provide a human readable verison of the conntext parse context.
Constructor Detail
Instance Method Detail
Creates a new context at the next parse position.