struct Pars3k::ParseResult(T)
- Pars3k::ParseResult(T)
- Struct
- Value
- Object
Overview
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
.
Defined in:
pars3k.crConstructors
Class Method Summary
Instance Method Summary
- #context
- #definite_error
- #definite_value
- #error
- #errored
- #initialize_as_error(e : ParseError)
- #set_context_position(pos)
- #value