Success

laika.parse.Success
case class Success[+T](result: T, next: SourceCursor) extends Parsed[T]

The success case of Parsed containing the result and the remaining input.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Parsed[T]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def map[U](f: T => U): Parsed[U]

Builds a new Parsed instance by applying the specified function to the result of this instance.

Builds a new Parsed instance by applying the specified function to the result of this instance.

Attributes

def orElse[U >: T](default: => Parsed[U]): Parsed[U]

Returns this Parsed instance if the parser succeeded or otherwise the specified fallback instance.

Returns this Parsed instance if the parser succeeded or otherwise the specified fallback instance.

Attributes

def toEither: Either[String, T]

The result as an Either, a Left in case of failure.

The result as an Either, a Left in case of failure.

Attributes

def toOption: Option[T]

The result as an Option, empty in case of failure.

The result as an Option, empty in case of failure.

Attributes

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any

Inherited methods

def getOrElse[B >: T](default: => B): B

Returns the result value from the parser invocation if the parser succeeded or otherwise the specified fallback value.

Returns the result value from the parser invocation if the parser succeeded or otherwise the specified fallback value.

Attributes

Inherited from:
Parsed
def isFailure: Boolean

Indicates whether this results represents an unsuccessful parser invocation.

Indicates whether this results represents an unsuccessful parser invocation.

Attributes

Inherited from:
Parsed
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

val isSuccess: Boolean

Indicates whether this results represents a successful parser invocation.

Indicates whether this results represents a successful parser invocation.

Attributes