Class

scala.meta.tql.Traverser

Matcher

Related Doc: package Traverser

Permalink

abstract class Matcher[+A] extends (T) ⇒ MatchResult[A]

A Matcher is a function or 'combinator' which takes a T and return an Option of tuple of - a transformed T (or the same) - a result of type A s.t Exists Monoid[A] so that results can be combined during the traversal A transformation/traversal has succeeded if the result of the application on the Matcher is not a None

Linear Supertypes
(T) ⇒ MatchResult[A], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Matcher
  2. Function1
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  5. by XtensionShow
  6. by XtensionInputLike
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Matcher()

    Permalink

Abstract Value Members

  1. abstract def apply(v1: T): MatchResult[A]

    Permalink
    Definition Classes
    Function1

Concrete Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +[B >: A](m: ⇒ Matcher[B])(implicit arg0: Monoid[B]): Matcher[B]

    Permalink

    Alias for aggregate

  4. def +>[B >: A](m: ⇒ Matcher[B])(implicit arg0: Monoid[B]): Matcher[B]

    Permalink

    Alias for aggregateResults

  5. def ->[B](y: B): (Matcher[A], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Matcher[A] to ArrowAssoc[Matcher[A]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. def <~[B](m: ⇒ Matcher[B])(implicit arg0: Monoid[B]): Matcher[A]

    Permalink

    Alias for andThenLeft

  7. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def aggregate[B >: A](m: ⇒ Matcher[B])(implicit arg0: Monoid[B]): Matcher[B]

    Permalink

    a aggregate b Apply a and apply b on the result of the application of a.

    a aggregate b Apply a and apply b on the result of the application of a. This means:

    • b is applied on the transformed T from a
    • the results of a and b are composed

    If a fails then b is applied If b fails then only the result of a is used

  9. def aggregateResults[B >: A](m: ⇒ Matcher[B])(implicit arg0: Monoid[B]): Matcher[B]

    Permalink

    a aggregateResults b Same as 'aggregate' but discard the transformed trees of a and b b operates on the origin tree, not the one transformed by a

  10. def andThen[B](m: ⇒ Matcher[B]): Matcher[B]

    Permalink

    a andThen b b is 'executed' only if a succeeded We discard the result of a

  11. def andThen[A](g: (MatchResult[A]) ⇒ A): (T) ⇒ A

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  12. def andThenLeft[B](m: ⇒ Matcher[B]): Matcher[A]

    Permalink

    a andThenLeft b b is 'executed' only if a succeeded We discard the result of b and only keep the result of a

  13. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. def compose[A](g: (A) ⇒ T): (A) ⇒ MatchResult[A]

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  16. def either[B, C >: A](m2: Matcher[B])(implicit arg0: Monoid[B], arg1: Monoid[C]): Matcher[(C, B)]

    Permalink
  17. def ensuring(cond: (Matcher[A]) ⇒ Boolean, msg: ⇒ Any): Matcher[A]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Matcher[A] to Ensuring[Matcher[A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. def ensuring(cond: (Matcher[A]) ⇒ Boolean): Matcher[A]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Matcher[A] to Ensuring[Matcher[A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. def ensuring(cond: Boolean, msg: ⇒ Any): Matcher[A]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Matcher[A] to Ensuring[Matcher[A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. def ensuring(cond: Boolean): Matcher[A]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Matcher[A] to Ensuring[Matcher[A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  23. def feed[B](m: ⇒ (A) ⇒ Matcher[B])(implicit arg0: Monoid[B]): Matcher[B]

    Permalink

    a feed {resa => b} combinator b can use the result (resa) of a.

  24. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  25. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Matcher[A] to StringFormat[Matcher[A]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  26. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  29. def map[B](f: (A) ⇒ B): Matcher[B]

    Permalink

    Transform the result of the Matcher, will probably change

  30. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  33. def orElse[B >: A](m: ⇒ Matcher[B])(implicit arg0: Monoid[B]): Matcher[B]

    Permalink

    a orElse b Apply b only if a failed

  34. def orThen[B](m: ⇒ Matcher[B])(implicit arg0: Monoid[B]): Matcher[B]

    Permalink

    a orThen b Apply b only if a failed but return a result of type b whaterver happens

  35. def parse[U](implicit convert: Convert[Matcher[A], meta.Input], dialect: Dialect, parse: meta.Parse[U]): U

    Permalink
    Implicit information
    This member is added by an implicit conversion from Matcher[A] to meta.XtensionInputLike[Matcher[A]] performed by method XtensionInputLike in scala.meta.syntactic.Api.
    Definition Classes
    XtensionInputLike
  36. def show[Style[X] <: Show[X]](implicit style: Style[Matcher[A]]): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Matcher[A] to meta.XtensionShow[Matcher[A]] performed by method XtensionShow in scala.meta.ui.Api.
    Definition Classes
    XtensionShow
  37. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    Function1 → AnyRef → Any
  39. def tokens(implicit convert: Convert[Matcher[A], meta.Input], dialect: Dialect): meta.Tokens

    Permalink
    Implicit information
    This member is added by an implicit conversion from Matcher[A] to meta.XtensionInputLike[Matcher[A]] performed by method XtensionInputLike in scala.meta.syntactic.Api.
    Definition Classes
    XtensionInputLike
  40. def tupledResultsWith[B, C >: A](m: ⇒ Matcher[B])(implicit arg0: Monoid[B], arg1: Monoid[C]): Matcher[(C, B)]

    Permalink

    a tupledResultsWith b Same as 'tupledWith' but discard the transformed trees of a and b b operates on the origin tree, not the one transformed by a

  41. def tupledWith[B, C >: A](m: ⇒ Matcher[B])(implicit arg0: Monoid[B], arg1: Monoid[C]): Matcher[(C, B)]

    Permalink

    Combine the result of two TreeMappers in a tuple2.

    Combine the result of two TreeMappers in a tuple2. The order is important, as the the second transformation is applied on the result of the first one.

  42. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. def |[B >: A](m: ⇒ Matcher[B])(implicit arg0: Monoid[B]): Matcher[B]

    Permalink

    Alias for orElse

  46. def |>[B](m: ⇒ Matcher[B])(implicit arg0: Monoid[B]): Matcher[B]

    Permalink

    Alias for orThen

  47. def ~[B, C >: A](m: ⇒ Matcher[B])(implicit arg0: Monoid[B], arg1: Monoid[C]): Matcher[(C, B)]

    Permalink

    Alias for tupledWith

  48. def ~>[B](m: ⇒ Matcher[B]): Matcher[B]

    Permalink

    Alias for andThen

  49. def [B](y: B): (Matcher[A], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Matcher[A] to ArrowAssoc[Matcher[A]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Matcher[A] to any2stringadd[Matcher[A]] performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (matcher: any2stringadd[Matcher[A]]).+(other)
    Definition Classes
    any2stringadd

Inherited from (T) ⇒ MatchResult[A]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Matcher[A] to any2stringadd[Matcher[A]]

Inherited by implicit conversion StringFormat from Matcher[A] to StringFormat[Matcher[A]]

Inherited by implicit conversion Ensuring from Matcher[A] to Ensuring[Matcher[A]]

Inherited by implicit conversion ArrowAssoc from Matcher[A] to ArrowAssoc[Matcher[A]]

Inherited by implicit conversion XtensionShow from Matcher[A] to meta.XtensionShow[Matcher[A]]

Inherited by implicit conversion XtensionInputLike from Matcher[A] to meta.XtensionInputLike[Matcher[A]]

Ungrouped