Trait

sbt.internal.util.complete

RichParser

Related Doc: package complete

Permalink

sealed trait RichParser[A] extends AnyRef

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RichParser
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def !!!(msg: String): Parser[A]

    Permalink

    Uses the specified message if the original Parser fails.

  2. abstract def &(o: Parser[_]): Parser[A]

    Permalink

    Apply the original parser, but only succeed if o also succeeds.

    Apply the original parser, but only succeed if o also succeeds. Note that o does not need to consume the same amount of input to satisfy this condition.

  3. abstract def *: Parser[Seq[A]]

    Permalink

    Apply the original Parser zero or more times and provide the (potentially empty) sequence of results.

  4. abstract def +: Parser[Seq[A]]

    Permalink

    Apply the original Parser one or more times and provide the non-empty sequence of results.

  5. abstract def <~[B](b: Parser[B]): Parser[A]

    Permalink

    Produces a Parser that applies the original Parser and then applies next (in order), discarding the result of next.

    Produces a Parser that applies the original Parser and then applies next (in order), discarding the result of next. (The arrow point in the direction of the retained result.)

  6. abstract def ?: Parser[Option[A]]

    Permalink

    Apply the original Parser zero or one times, returning None if it was applied zero times or the result wrapped in Some if it was applied once.

  7. abstract def ??[B >: A](alt: B): Parser[B]

    Permalink

    Apply the original Parser, but provide alt as the result if it fails.

  8. abstract def ^^^[B](value: B): Parser[B]

    Permalink

    Apply the original Parser, but provide value as the result if it succeeds.

  9. abstract def combinedWith(b: Parser[A]): Parser[Seq[A]]

    Permalink

    Applied both the original parser and b on the same input and returns the results produced by each parser

  10. abstract def examples(exampleSource: ExampleSource, maxNumberOfExamples: Int, removeInvalidExamples: Boolean): Parser[A]

    Permalink

    exampleSource

    the source of examples when displaying completions to the user.

    maxNumberOfExamples

    limits the number of examples that the source of examples should return. This can prevent lengthy pauses and avoids bad interactive user experience.

    removeInvalidExamples

    indicates whether completion examples should be checked for validity (against the given parser). Invalid examples will be filtered out and only valid suggestions will be displayed.

    returns

    a new parser with a new source of completions.

  11. abstract def examples(s: Set[String], check: Boolean = false): Parser[A]

    Permalink

    Explicitly defines the completions for the original Parser.

  12. abstract def examples(s: String*): Parser[A]

    Permalink

    Explicitly defines the completions for the original Parser.

  13. abstract def failOnException: Parser[A]

    Permalink

    If an exception is thrown by the original Parser, capture it and fail locally instead of allowing the exception to propagate up and terminate parsing.

  14. abstract def filter(f: (A) ⇒ Boolean, msg: (String) ⇒ String): Parser[A]

    Permalink

    Produces a Parser that filters the original parser.

    Produces a Parser that filters the original parser. If 'f' is not true when applied to the output of the original parser, the Parser returned by this method fails. The failure message is constructed by applying msg to the String that was successfully parsed by the original parser.

  15. abstract def flatMap[B](f: (A) ⇒ Parser[B]): Parser[B]

    Permalink

    Applies the original parser, applies f to the result to get the next parser, and applies that parser and uses its result for the overall result.

  16. abstract def id: Parser[A]

    Permalink

    Returns the original parser.

    Returns the original parser. This is useful for converting literals to Parsers. For example, 'c'.id or "asdf".id

  17. abstract def map[B](f: (A) ⇒ B): Parser[B]

    Permalink

    Apply the original Parser to the input and then apply f to the result.

  18. abstract def string(implicit ev: <:<[A, Seq[Char]]): Parser[String]

    Permalink

    Converts a Parser returning a Char sequence to a Parser returning a String.

  19. abstract def |[B >: A](b: Parser[B]): Parser[B]

    Permalink

    Apply either the original Parser or b.

  20. abstract def ||[B](b: Parser[B]): Parser[Either[A, B]]

    Permalink

    Apply either the original Parser or b.

  21. abstract def ~[B](next: Parser[B]): Parser[(A, B)]

    Permalink

    Apply the original Parser and then apply next (in order).

    Apply the original Parser and then apply next (in order). The result of both is provides as a pair.

  22. abstract def ~>[B](b: Parser[B]): Parser[B]

    Permalink

    Produces a Parser that applies the original Parser and then applies next (in order), discarding the result of the original parser.

    Produces a Parser that applies the original Parser and then applies next (in order), discarding the result of the original parser. (The arrow point in the direction of the retained result.)

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def examples(exampleSource: ExampleSource): Parser[A]

    Permalink

    exampleSource

    the source of examples when displaying completions to the user.

    returns

    a new parser with a new source of completions. It displays at most 25 completion examples and does not remove invalid examples.

  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  17. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped