struct

Pars::ParseContext

Inherits Struct / Value / Object

A struct containing information about a parsing context. Used to chain Parsers together and retain input position.

Constructors

new(input : Slice(UInt8) | String, pos : Int32 = 0)
Source

Instance methods

byte

Provides the parse head as a byte.

Source
char

Provides the parse head as a Char.

Source
exhausted?

true if all of the input has been consumed.

Source
head

Provide the current parse head directly.

Source
input

The input the parser is working across.

Source
next(offset = 1) : ParseContext

Creates a new context at the next parse position.

Source
pos

The correct parse offset within input.

Source
to_s(io : IO)

Provide a human readable verison of the conntext parse context.

Source