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
Class methods
error(message : String, context : ParseContext)
Sourceerror(e : ParseError)
SourceInstance methods
context
Sourcedefinite_error
Sourcedefinite_value
Sourceerror
Sourceerrored
Sourceinitialize_as_error(e : ParseError)
Sourceset_context_position(pos)
Sourcevalue
Source