Success

scala.util.parsing.combinator.Parsers.Success
case class Success[+T](result: T, next: Input) extends ParseResult[T]

The success case of ParseResult: contains the result and the remaining input.

Value parameters

next

The parser's remaining input

result

The parser's output

Attributes

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

Members list

Value members

Concrete methods

def append[U >: T](a: => ParseResult[U]): ParseResult[U]
def filterWithError(p: T => Boolean, error: T => String, position: Input): ParseResult[T]
def flatMapWithNext[U](f: T => Input => ParseResult[U]): ParseResult[U]
def get: T

Returns the embedded result.

Returns the embedded result.

Attributes

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

Functional composition of ParseResults.

Functional composition of ParseResults.

Value parameters

f

the function to be lifted over this result

Attributes

Returns

f applied to the result of this ParseResult, packaged up as a new ParseResult

def mapPartial[U](f: PartialFunction[T, U], error: T => String): ParseResult[U]

Partial functional composition of ParseResults.

Partial functional composition of ParseResults.

Value parameters

error

a function that takes the same argument as f and produces an error message to explain why f wasn't applicable (it is called when this is the case)

f

the partial function to be lifted over this result

Attributes

Returns

if f f is defined at the result in this ParseResult, f applied to the result of this ParseResult, packaged up as a new ParseResult. If f is not defined, Failure.

override def toString: String

The toString method of a Success.

The toString method of a Success.

Attributes

Definition Classes
Any

Inherited methods

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

Attributes

Inherited from:
ParseResult

Attributes

Inherited from:
ParseResult

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Concrete fields