Packages

  • package root

    The Scala compiler and reflection APIs.

    The Scala compiler and reflection APIs.

    Definition Classes
    root
  • package scala
    Definition Classes
    root
  • package tools
    Definition Classes
    scala
  • package nsc
    Definition Classes
    tools
  • package ast
    Definition Classes
    nsc
  • trait TreeDSL extends AnyRef

    A DSL for generating scala code.

    A DSL for generating scala code. The goal is that the code generating code should look a lot like the code it generates.

    Definition Classes
    ast
  • CODE

object CODE

Source
TreeDSL.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CODE
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class CaseStart extends AnyRef
  2. class IfStart extends AnyRef
  3. case class SelectStart(tree: Global.Select) extends Product with Serializable
  4. class TreeMethods extends AnyRef
  5. class TryStart extends AnyRef

Value Members

  1. def AND(guards: Global.Tree*): Global.Tree
  2. def BLOCK(xs: Global.Tree*): Global.Block
  3. def CASE(pat: Global.Tree): CaseStart
  4. def DEFAULT: CaseStart
  5. def FALSE: Global.Literal
  6. def IF(tree: Global.Tree): IfStart
  7. def NEW(tpt: Global.Tree, args: Global.Tree*): Global.Tree
  8. def NOT(tree: Global.Tree): Global.Select
  9. def NULL: Global.Literal
  10. def REF(pre: Global.Type, sym: Global.Symbol): Global.RefTree
  11. def REF(sym: Global.Symbol): Global.RefTree

    Typed trees from symbols.

  12. def SOME(xs: Global.Tree*): Global.Tree
  13. def TRUE: Global.Literal
  14. def TRY(tree: Global.Tree): TryStart
  15. def UNIT: Global.Literal
  16. def ZERO: Global.Literal
  17. def fn(lhs: Global.Tree, op: Global.Symbol, args: Global.Tree*): Global.Apply
  18. def fn(lhs: Global.Tree, op: Global.Name, args: Global.Tree*): Global.Apply
  19. implicit def mkTreeFromSelectStart(ss: SelectStart): Global.Select

    (foo DOT bar) might be simply a Select, but more likely it is to be immediately followed by an Apply.

    (foo DOT bar) might be simply a Select, but more likely it is to be immediately followed by an Apply. We don't want to add an actual apply method to arbitrary trees, so SelectStart is created with an apply - and if apply is not the next thing called, the implicit from SelectStart -> Tree will provide the tree.

  20. implicit def mkTreeMethods(target: Global.Tree): TreeMethods

    Implicits - some of these should probably disappear *

  21. implicit def mkTreeMethodsFromSelectStart(ss: SelectStart): TreeMethods
  22. implicit def mkTreeMethodsFromSymbol(target: Global.Symbol): TreeMethods
  23. def nullSafe[T](f: (Global.Tree) ⇒ Global.Tree, ifNull: Global.Tree): (Global.Tree) ⇒ Global.Tree
  24. def returning[T](x: T)(f: (T) ⇒ Unit): T
  25. object LIT extends (Any) ⇒ Global.Literal