Trait

org.emmalanguage.ast

CommonAST

Related Doc: package ast

Permalink

trait CommonAST extends AnyRef

Implements various utility functions that mitigate and/or workaround deficiencies in Scala's macros and runtime reflection APIs, e.g. non-idempotent type checking, lack of hygiene, capture-avoiding substitution, fully-qualified names, fresh name generation, identifying closures, etc.

This trait has to be instantiated with a scala.reflect.api.Universe type and works for both runtime and compile time reflection.

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

Type Members

  1. type =?>[-A, +B] = PartialFunction[A, B]

    Permalink

    Syntax sugar for partial functions.

  2. trait Meta extends AnyRef

    Permalink

    Meta information (attachments).

  3. trait Node extends AnyRef

    Permalink

    Common parent for all virtual AST nodes.

  4. sealed trait TreeTransform extends AnyRef

    Permalink
  5. type Xfrm = TreeTransform

    Permalink
  6. trait XfrmAlg[B] extends AnyRef

    Permalink
  7. trait XfrmEval extends AnyRef

    Permalink
  8. implicit class XfrmOps extends (scala.reflect.api.Universe.Tree) ⇒ scala.reflect.api.Universe.Tree

    Permalink

Abstract Value Members

  1. abstract def abort(msg: String, pos: scala.reflect.api.Universe.Position = u.NoPosition): Nothing

    Permalink

    Raises an error and terminates compilation.

  2. abstract def enclosingOwner: scala.reflect.api.Universe.Symbol

    Permalink

    Returns the enclosing named entity (class, method, value, etc).

  3. abstract def eval[T](code: scala.reflect.api.Universe.Tree): T

    Permalink

    Evaluates a snippet of code and returns a value of type T.

    Evaluates a snippet of code and returns a value of type T. Note: this can be called on type--checked trees (as opposed to the eval method in ToolBox).

  4. abstract def inferImplicit(tpe: scala.reflect.api.Universe.Type): Option[scala.reflect.api.Universe.Tree]

    Permalink

    Infers an implicit value from the enclosing context (if possible).

  5. abstract def meta(tree: scala.reflect.api.Universe.Tree): Meta

    Permalink

    Returns the meta information associated with tree.

  6. abstract def meta(sym: scala.reflect.api.Universe.Symbol): Meta

    Permalink

    Returns the meta information associated with sym.

  7. abstract def parse(code: String): scala.reflect.api.Universe.Tree

    Permalink

    Parses a snippet of source code and returns the AST.

  8. abstract def typeCheck(tree: scala.reflect.api.Universe.Tree, typeMode: Boolean = false): scala.reflect.api.Universe.Tree

    Permalink

    Type-checks a tree (use typeMode=true for type-trees).

  9. abstract val u: Universe

    Permalink
  10. abstract def warning(msg: String, pos: scala.reflect.api.Universe.Position = u.NoPosition): Unit

    Permalink

    Raises a compiler warning.

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. lazy val Flags: Set[scala.reflect.api.Universe.FlagSet]

    Permalink

    All explicit flags.

  5. lazy val FlagsNoSynthetic: Set[scala.reflect.api.Universe.FlagSet]

    Permalink
  6. object Max

    Permalink

    Constant limits.

  7. object NaiveEval extends XfrmEval

    Permalink

    Just evaluate the tree transform.

  8. object TimerEval extends XfrmEval

    Permalink

    Evaluate and time each node.

  9. object TreeTransform

    Permalink
  10. object UniverseImplicits

    Permalink

    Factors out the implicit objects that need to be imported from the Scala universe.

    Factors out the implicit objects that need to be imported from the Scala universe.

    Please use

    import UniverseImplicits._
    
    u.Type
    u.method

    as opposed to

    import universe._ // or import u._
    
    Type
    method

    in order to make the parts of the Emma compiler which depend on the Scala metaprogramming API explicit.

    Attributes
    protected[org.emmalanguage]
  11. final val Xfrm: TreeTransform.type

    Permalink
  12. object are

    Permalink
  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. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  19. object has

    Permalink
  20. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  21. object have

    Permalink
  22. object is

    Permalink
  23. final def isInstanceOf[T0]: Boolean

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

    Permalink
    Definition Classes
    AnyRef
  25. val noop: Xfrm

    Permalink
  26. final def notify(): Unit

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  30. def unTypeCheck(tree: scala.reflect.api.Universe.Tree): scala.reflect.api.Universe.Tree

    Permalink

    Removes all type and symbol attributes from a 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( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped