Packages

abstract class TreeBuilder extends AnyRef

Methods for building trees, used in the parser. All the trees returned by this class must be untyped.

Source
TreeBuilder.scala
Linear Supertypes
Known Subclasses
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TreeBuilder
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new TreeBuilder()

Abstract Value Members

  1. abstract val global: Global
  2. abstract def source: SourceFile
  3. abstract def unit: Global.CompilationUnit

Concrete Value Members

  1. def addEvidenceParams(owner: Global.Name, vparamss: List[List[Global.ValDef]], contextBounds: List[Global.Tree]): List[List[Global.ValDef]]

    Append implicit parameter section if contextBounds nonempty

  2. def byNameApplication(tpe: Global.Tree): Global.Tree
  3. def convertToTypeName(t: Global.Tree): Option[Global.RefTree]
  4. implicit def fresh: FreshNameCreator
  5. def makeAlternative(ts: List[Global.Tree]): Global.Tree

    Create tree for a pattern alternative

  6. def makeAnnotated(t: Global.Tree, annot: Global.Tree): Global.Tree
  7. def makeBlock(stats: List[Global.Tree]): Global.Tree

    Create block of statements stats

  8. def makeCaseDef(pat: Global.Tree, guard: Global.Tree, rhs: Global.Tree): Global.CaseDef

    Create tree for case definition <case pat if guard => rhs>

  9. def makeCatchFromExpr(catchExpr: Global.Tree): Global.CaseDef

    Creates tree representing: { case x: Throwable => val catchFn = catchExpr if (catchFn isDefinedAt x) catchFn(x) else throw x }

  10. def makeCatchFromFunc(catchFn: Global.Tree): Global.CaseDef

    Creates tree representing: { case x: Throwable => catchExpr(x) }

  11. def makeDoWhile(lname: Global.TermName, body: Global.Tree, cond: Global.Tree): Global.Tree

    Create tree representing a do-while loop

  12. def makeFunctionTypeTree(argtpes: List[Global.Tree], restpe: Global.Tree): Global.Tree

    Create a tree representing the function type (argtpes) => restpe

  13. def makeImportSelector(name: Global.Name, nameOffset: Int): Global.ImportSelector
  14. def makeMatchFromExpr(catchExpr: Global.Tree): List[Global.CaseDef]

    At parser, rejigger non-case catch expression.

    At parser, rejigger non-case catch expression.

    Match is eliminated by unwrapping. Other expression becomes a single CaseDef with empty pattern and expr tree as RHS.

  15. def makeParam(pname: Global.TermName, tpe: Global.Tree): Global.ValDef
  16. def makePatDef(mods: Global.Modifiers, pat: Global.Tree, rhs: Global.Tree, rhsPos: Global.Position): List[Global.ValDef]
  17. final def makePatDef(mods: Global.Modifiers, pat: Global.Tree, rhs: Global.Tree): List[Global.ValDef]
  18. def makePostfixSelect(start: Int, end: Int, od: Global.Tree, op: Global.Name): Global.Tree

    Tree for od op, start is start0 if od.pos is borked.

  19. def makeSelfDef(name: Global.TermName, tpt: Global.Tree): Global.ValDef
  20. def makeSyntheticTypeParam(pname: Global.TypeName, bounds: Global.Tree): Global.TypeDef
  21. def makeTupleTerm(elems: List[Global.Tree]): Global.Tree
  22. def makeTupleType(elems: List[Global.Tree]): Global.Tree
  23. def makeWhile(startPos: Int, cond: Global.Tree, body: Global.Tree): Global.Tree

    Create tree representing a while loop

  24. def o2p(offset: Int): Global.Position
  25. def r2p(start: Int, mid: Int, end: Int): Global.Position
  26. def repeatedApplication(tpe: Global.Tree): Global.Tree
  27. def rootScalaDot(name: Global.Name): Global.Select
  28. def scalaAnyRefConstr: Global.Select
  29. def scalaDot(name: Global.Name): Global.Select
  30. def scalaUnitConstr: Global.Select