|
|
| ParseResult (T &&result) |
| | Construct from a successful result.
|
|
| ParseResult (const T &result) |
| | Construct from a successful result.
|
|
| ParseResult (ParseDiagnostic &&error) |
| | Construct from an error.
|
|
| ParseResult (const ParseDiagnostic &error) |
| | Construct from an error by value.
|
| | ParseResult (T &&result, ParseDiagnostic &&error) |
| | Return a result, but also an error.
|
| T & | result () & |
| | Returns the contained result.
|
| T && | result () && |
| | Returns the contained result.
|
| const T & | result () const & |
| | Returns the contained result.
|
| ParseDiagnostic & | error () & |
| | Returns the contained error.
|
| ParseDiagnostic && | error () && |
| | Returns the contained error.
|
| const ParseDiagnostic & | error () const & |
| | Returns the contained error.
|
|
bool | hasResult () const noexcept |
| | Returns true if this ParseResult contains a valid result.
|
|
bool | hasError () const noexcept |
| | Returns true if this ParseResult contains an error.
|
| template<typename Target, typename Functor> |
| ParseResult< Target > | map (const Functor &functor) && |
| | Map the result of this ParseResult to a new type, by transforming the result with the provided functor.
|
| template<typename Target, typename Functor> |
| ParseResult< Target > | mapError (const Functor &functor) && |
| | Map the error of this ParseResult to a new type, by transforming the error with the provided functor.
|
template<typename T>
class donner::ParseResult< T >
A parser result, which may contain a result of type T, or an error, or both.
- Template Parameters
-