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.

Abstract Value Members

  1. abstract def abort(msg: String, pos: scala.reflect.api.Universe.Position = 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 = 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 are

    Permalink
  8. final def asInstanceOf[T0]: T0

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  14. object has

    Permalink
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. object have

    Permalink
  17. object is

    Permalink
  18. final def isInstanceOf[T0]: Boolean

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

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

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

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

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

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

    Permalink

    Removes all type and symbol attributes from a tree.

  25. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped