Class

org.emmalanguage.ast.Transversers

Strategy

Related Doc: package Transversers

Permalink

case class Strategy[A <: HList, I <: HList, S <: HList](grammar: AST.AttrGrammar[A, I, S], factory: AST.Factory) extends Product with Serializable

A traversal / transformation strategy. 4 fundamental strategies are available:

1. Top-down continue left-to-right 2. Top-down break left-to-right 3. Bottom-up continue left-to-right 4. Bottom-up break left-to-right

Right-to-left variants are not supported.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Strategy
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Strategy(grammar: AST.AttrGrammar[A, I, S], factory: AST.Factory)

    Permalink

Type Members

  1. type Acc = A

    Permalink
  2. type Inh = I

    Permalink
  3. type Syn = S

    Permalink

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. def accumulate[X](acc: AST.=?>[scala.reflect.api.Universe.Tree, X])(implicit arg0: Monoid[X]): AST.Strategy[::[X, A], I, S]

    Permalink

    Prepends an accumulated attribute based on trees only.

  5. def accumulateInit[X](init: X)(acc: AST.=?>[AST.Attr[::[X, A], I, S], X])(implicit arg0: Monoid[X]): AST.Strategy[::[X, A], I, S]

    Permalink

    Prepends an accumulated attribute based on all attributes.

  6. def accumulateWith[X](acc: AST.=?>[AST.Attr[::[X, A], I, S], X])(implicit m: Monoid[X]): AST.Strategy[::[X, A], I, S]

    Permalink

    Prepends an accumulated attribute based on all attributes.

  7. final def asInstanceOf[T0]: T0

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

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

    Permalink
    Definition Classes
    AnyRef
  10. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def inherit[X](inh: AST.=?>[scala.reflect.api.Universe.Tree, X])(implicit arg0: Monoid[X]): AST.Strategy[A, ::[X, I], S]

    Permalink

    Prepends an inherited attribute based on trees only.

  13. def inheritInit[X](init: X)(inh: AST.=?>[AST.Attr[HNil, ::[X, I], S], X])(implicit arg0: Monoid[X]): AST.Strategy[A, ::[X, I], S]

    Permalink

    Prepends an inherited attribute based on inherited and synthesized attributes.

  14. def inheritWith[X](inh: AST.=?>[AST.Attr[HNil, ::[X, I], S], X])(implicit m: Monoid[X]): AST.Strategy[A, ::[X, I], S]

    Permalink

    Prepends an inherited attribute based on inherited and synthesized attributes.

  15. final def isInstanceOf[T0]: Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  20. def synthesize[X](syn: AST.=?>[scala.reflect.api.Universe.Tree, X])(implicit arg0: Monoid[X]): AST.Strategy[A, I, ::[X, S]]

    Permalink

    Prepends a synthesized attribute based on trees only.

  21. def synthesizeInit[X](init: X)(syn: AST.=?>[AST.Attr[HNil, HNil, ::[X, S]], X])(implicit arg0: Monoid[X]): AST.Strategy[A, I, ::[X, S]]

    Permalink

    Prepends a synthesized attribute based on all synthesized attributes.

  22. def synthesizeWith[X](syn: AST.=?>[AST.Attr[HNil, HNil, ::[X, S]], X])(implicit m: Monoid[X]): AST.Strategy[A, I, ::[X, S]]

    Permalink

    Prepends a synthesized attribute based on all synthesized attributes.

  23. def transform(template: AST.=?>[scala.reflect.api.Universe.Tree, scala.reflect.api.Universe.Tree]): AST.Transform[A, I, S]

    Permalink

    Transforms a tree without access to attributes.

  24. def transformSyn(template: AST.=?>[AST.Attr[A, I, (scala.reflect.api.Universe.Tree) ⇒ S], scala.reflect.api.Universe.Tree]): AST.Transform[A, I, S]

    Permalink

    Transforms a tree with access to all attributes (and a memoized synthesis function).

  25. def transformWith(template: AST.=?>[AST.Attr[A, I, S], scala.reflect.api.Universe.Tree]): AST.Transform[A, I, S]

    Permalink

    Transforms a tree with access to all attributes.

  26. def traverse(callback: AST.=?>[scala.reflect.api.Universe.Tree, Unit]): AST.Traversal[A, I, S]

    Permalink

    Traverses a tree without access to attributes.

  27. def traverseAny: AST.Traversal[A, I, S]

    Permalink

    Shortcut for visiting every node in a tree.

  28. def traverseSyn(callback: AST.=?>[AST.Attr[A, I, (scala.reflect.api.Universe.Tree) ⇒ S], Unit]): AST.Traversal[A, I, S]

    Permalink

    Traverses a tree with access to all attributes (and a memoized synthesis function).

  29. def traverseWith(callback: AST.=?>[AST.Attr[A, I, S], Unit]): AST.Traversal[A, I, S]

    Permalink

    Traverses a tree with access to all attributes.

  30. def unsafe: AST.Strategy[A, I, S]

    Permalink

    Skip type-safety assertions.

    Skip type-safety assertions. WARNING: Use only if you mean to change types in the tree.

  31. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. def withAncestors: AST.Strategy[A, ::[Vector[scala.reflect.api.Universe.Tree], I], S]

    Permalink

    Inherits all ancestors of the current node in a vector.

  35. def withAssignments: AST.Strategy[A, I, ::[Map[scala.reflect.api.Universe.TermSymbol, Int], S]]

    Permalink

    Counts all variable assignments contained in the current node and its children.

  36. def withBindDefs: AST.Strategy[A, I, ::[Map[scala.reflect.api.Universe.TermSymbol, scala.reflect.api.Universe.ValDef], S]]

    Permalink

    Synthesizes all binding definitions contained in the current node and its children.

  37. def withBindUses: AST.Strategy[A, I, ::[Map[scala.reflect.api.Universe.TermSymbol, Int], S]]

    Permalink

    Counts all binding references contained in the current node and its children.

  38. def withDefCalls: AST.Strategy[A, I, ::[Map[scala.reflect.api.Universe.MethodSymbol, Int], S]]

    Permalink

    Counts all method calls contained in the current node and its children.

  39. def withDefDefs: AST.Strategy[A, I, ::[Map[scala.reflect.api.Universe.MethodSymbol, scala.reflect.api.Universe.DefDef], S]]

    Permalink

    Synthesizes all method definitions contained in the current node and its children.

  40. def withDefs: AST.Strategy[A, I, ::[Map[scala.reflect.api.Universe.TermSymbol, scala.reflect.api.Universe.Tree], S]]

    Permalink

    Synthesizes all term definitions contained in the current node and its children.

  41. def withOwner(default: scala.reflect.api.Universe.Symbol): AST.Strategy[A, ::[scala.reflect.api.Universe.Symbol, I], S]

    Permalink

    Inherits the owner of the current node.

  42. def withOwner: AST.Strategy[A, ::[scala.reflect.api.Universe.Symbol, I], S]

    Permalink

    Inherits the owner of the current node.

  43. def withOwnerChain: AST.Strategy[A, ::[Vector[scala.reflect.api.Universe.Symbol], I], S]

    Permalink

    Inherits the owner chain of the current node.

  44. def withParDefs: AST.Strategy[A, I, ::[Map[scala.reflect.api.Universe.TermSymbol, scala.reflect.api.Universe.ValDef], S]]

    Permalink

    Synthesizes all parameter definitions contained in the current node and its children.

  45. def withParUses: AST.Strategy[A, I, ::[Map[scala.reflect.api.Universe.TermSymbol, Int], S]]

    Permalink

    Counts all parameter references contained in the current node and its children.

  46. def withParent: AST.Strategy[A, ::[Option[scala.reflect.api.Universe.Tree], I], S]

    Permalink

    Inherits the parent of the current node (None if the current node is the root).

  47. def withRoot: AST.Strategy[A, ::[Option[scala.reflect.api.Universe.Tree], I], S]

    Permalink

    Inherits the root of the tree (None if the current node is the root).

  48. def withUses: AST.Strategy[A, I, ::[Map[scala.reflect.api.Universe.TermSymbol, Int], S]]

    Permalink

    Counts all term references contained in the current node and its children.

  49. def withValDefs: AST.Strategy[A, I, ::[Map[scala.reflect.api.Universe.TermSymbol, scala.reflect.api.Universe.ValDef], S]]

    Permalink

    Synthesizes all value definitions contained in the current node and its children.

  50. def withValUses: AST.Strategy[A, I, ::[Map[scala.reflect.api.Universe.TermSymbol, Int], S]]

    Permalink

    Counts all value references contained in the current node and its children.

  51. def withVarDefs: AST.Strategy[A, I, ::[Map[scala.reflect.api.Universe.TermSymbol, scala.reflect.api.Universe.ValDef], S]]

    Permalink

    Synthesizes all variable definitions contained in the current node and its children.

  52. def withVarUses: AST.Strategy[A, I, ::[Map[scala.reflect.api.Universe.TermSymbol, Int], S]]

    Permalink

    Counts all variable references contained in the current node and its children.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped