Scala Compiler 2.13.16 - scala.tools.nsc.ast.parser.TreeBuilder
Keywords: Scala Compiler 2.13.16 scala.tools.nsc.ast.parser.TreeBuilder

Scala Compiler2.13.16 < Back


# 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
-  package parser
  Definition Classes
    ast
-  package xml
  Definition Classes
    parser
- BracePair
- BracePatch
- Cbuf
- Change
- CommonTokens
- Deletion
- Insertion
- MarkupParsers
- Parsers
- ParsersCommon
- Patch
- Scanners
- ScannersCommon
- SymbolicXMLBuilder
- SyntaxAnalyzer
- Tokens
- TreeBuilder

c

scala.tools.nsc.ast.parser

# TreeBuilder

###

#### 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
AnyRef, Any
Known Subclasses
ParserTreeBuilder
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.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##: Int
   Definition Classes
     AnyRef → Any
3.  def +(other: String): String
   Implicit
     This member is added by an implicit conversion from TreeBuilder toany2stringadd[TreeBuilder] performed by method any2stringadd in scala.Predef.
   Definition Classes
     any2stringadd
4.  def ->[B](y: B): (TreeBuilder, B)
   Implicit
     This member is added by an implicit conversion from TreeBuilder toArrowAssoc[TreeBuilder] performed by method ArrowAssoc in scala.Predef.
   Definition Classes
     ArrowAssoc
   Annotations
     @inline()
5.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
6.  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

7.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
8.  def byNameApplication(tpe: Global.Tree): Global.Tree
9.  def clone(): AnyRef
   Attributes
     protected[lang]
   Definition Classes
     AnyRef
   Annotations
     @throws(classOf[java.lang.CloneNotSupportedException]) @native()
10.  def convertToTypeName(t: Global.Tree): Option[Global.RefTree]
11.  def ensuring(cond: (TreeBuilder) => Boolean, msg: => Any): TreeBuilder
    Implicit
      This member is added by an implicit conversion from TreeBuilder toEnsuring[TreeBuilder] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
12.  def ensuring(cond: (TreeBuilder) => Boolean): TreeBuilder
    Implicit
      This member is added by an implicit conversion from TreeBuilder toEnsuring[TreeBuilder] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
13.  def ensuring(cond: Boolean, msg: => Any): TreeBuilder
    Implicit
      This member is added by an implicit conversion from TreeBuilder toEnsuring[TreeBuilder] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
14.  def ensuring(cond: Boolean): TreeBuilder
    Implicit
      This member is added by an implicit conversion from TreeBuilder toEnsuring[TreeBuilder] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
15.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
16.  def equals(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef → Any
17.  def finalize(): Unit
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.Throwable])
18.  implicit def fresh: FreshNameCreator
19.  final def getClass(): Class[_ <: AnyRef]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
20.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
21.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
22.  def makeAlternative(ts: List[Global.Tree]): Global.Tree

    Create tree for a pattern alternative

23.  def makeAnnotated(t: Global.Tree, annot: Global.Tree): Global.Tree
24.  def makeBlock(stats: List[Global.Tree]): Global.Tree

    Create block of statements `stats`

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

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

26.  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 }

27.  def makeCatchFromFunc(catchFn: Global.Tree): Global.CaseDef

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

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

    Create tree representing a do-while loop

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

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

30.  def makeImportSelector(name: Global.Name, nameOffset: Int): Global.ImportSelector
31.  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.

32.  def makeParam(pname: Global.TermName, tpe: Global.Tree): Global.ValDef
33.  def makePatDef(mods: Global.Modifiers, pat: Global.Tree, rhs: Global.Tree, rhsPos: Global.Position): List[Global.ValDef]
34.  final def makePatDef(mods: Global.Modifiers, pat: Global.Tree, rhs: Global.Tree): List[Global.ValDef]
35.  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.

36.  def makeSelfDef(name: Global.TermName, tpt: Global.Tree): Global.ValDef
37.  def makeSyntheticTypeParam(pname: Global.TypeName, bounds: Global.Tree): Global.TypeDef
38.  def makeTupleTerm(elems: List[Global.Tree]): Global.Tree
39.  def makeTupleType(elems: List[Global.Tree]): Global.Tree
40.  def makeWhile(startPos: Int, cond: Global.Tree, body: Global.Tree): Global.Tree

    Create tree representing a while loop

41.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
42.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
43.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
44.  def o2p(offset: Int): Global.Position
45.  def r2p(start: Int, mid: Int, end: Int): Global.Position
46.  def repeatedApplication(tpe: Global.Tree): Global.Tree
47.  def rootScalaDot(name: Global.Name): Global.Select
48.  def scalaAnyRefConstr: Global.Select
49.  def scalaDot(name: Global.Name): Global.Select
50.  def scalaUnitConstr: Global.Select
51.  final def synchronized[T0](arg0: => T0): T0
    Definition Classes
      AnyRef
52.  def toString(): String
    Definition Classes
      AnyRef → Any
53.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
54.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
55.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException]) @native()

### Deprecated Value Members

1.  def formatted(fmtstr: String): String
   Implicit
     This member is added by an implicit conversion from TreeBuilder toStringFormat[TreeBuilder] performed by method StringFormat in scala.Predef.
   Definition Classes
     StringFormat
   Annotations
     @deprecated @inline()
   Deprecated

     (Since version 2.12.16) Use `formatString.format(value)` instead of `value.formatted(formatString)`, or use the `f""` string interpolator. In Java 15 and later, `formatted` resolves to the new method in String which has reversed parameters.

2.  def →[B](y: B): (TreeBuilder, B)
   Implicit
     This member is added by an implicit conversion from TreeBuilder toArrowAssoc[TreeBuilder] performed by method ArrowAssoc in scala.Predef.
   Definition Classes
     ArrowAssoc
   Annotations
     @deprecated
   Deprecated

     (Since version 2.13.0) Use `->` instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

### Inherited from AnyRef

### Inherited from Any

### Inherited by implicit conversion any2stringadd fromTreeBuilder to any2stringadd[TreeBuilder]

### Inherited by implicit conversion StringFormat fromTreeBuilder to StringFormat[TreeBuilder]

### Inherited by implicit conversion Ensuring fromTreeBuilder to Ensuring[TreeBuilder]

### Inherited by implicit conversion ArrowAssoc fromTreeBuilder to ArrowAssoc[TreeBuilder]

### Ungrouped