ParseResult

Parse result

Constructors

this
this(R r, T d)
this(R r)

Create a parse result (implies ok = true)

this
this(R r, T d)
Undocumented in source.
this
this(R r)
Undocumented in source.
this
this(E e)

Create a parse result with error (implies ok = false)

Members

Aliases

DataType
alias DataType = T

The data type, for convenience

ErrType
alias ErrType = E
Undocumented in source.

Functions

opCast
auto opCast()

ParseResult is covariant on its data type

opCast
auto opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

cont
R cont [@property getter]

Get result range, where the following parsers should continue parsing

err
E err [@property getter]

Get error information

v
T v [@property getter]

Return the data, only available if T != void, fails if ok != true

v
auto v [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

apply
auto apply(ParseResult!(R, T, E) i)
Undocumented in source. Be warned that the author may not have intended to support it.
apply_err
auto apply_err(ParseResult!(R, T, E) i)

Transform func that takes a E into a function that takes a ParseResult

Variables

ok
immutable(bool) ok;

Indicates whether the parser succeeded

Parameters

R

Range type

E

Error type, must be copyable, non reference type

T

Data type, used for returning data from parser

Meta