struct

Pars3k::ParseResult(T)

Inherits Struct / Value / Object

ParseResult(T) is a result of a parsed Parser with return type T. If the parse errored, then ParseResult(T)#errored will be true. Otherwise, you can get a value of type (T | ParseError) with ParseResult(T).value. If you are absolutely positive the parse did NOT error (e.g. !ParseResult(T).errored), then you can acquire the value of type T with ParseResult(T).definite_value.

Constructors

new(value : T, context : Pars3k::ParseContext)
Source

Class methods

error(message : String, context : ParseContext)
Source
error(e : ParseError)
Source

Instance methods

context
Source
definite_error
Source
definite_value
Source
error
Source
errored
Source
initialize_as_error(e : ParseError)
Source
set_context_position(pos)
Source
value
Source