Instance

abstract class Instance[T >: Untyped <: Type]
class Object
trait Matchable
class Any
object tpd.type
object untpd.type

Type members

Classlikes

class DeepFolder[X](f: (X, Tree) => X) extends TreeAccumulator[X]

Fold f over all tree nodes, in depth-first, prefix order

Fold f over all tree nodes, in depth-first, prefix order

class ShallowFolder[X](f: (X, Tree) => X) extends TreeAccumulator[X]

Fold f over all tree nodes, in depth-first, prefix order, but don't visit subtrees where f returns a different result for the root, i.e. f(x, root) ne x.

Fold f over all tree nodes, in depth-first, prefix order, but don't visit subtrees where f returns a different result for the root, i.e. f(x, root) ne x.

abstract class TreeAccumulator[X]
abstract class TreeCopier

A class for copying trees. The copy methods avoid creating a new tree If all arguments stay the same.

A class for copying trees. The copy methods avoid creating a new tree If all arguments stay the same.

Note: Some of the copy methods take a context. These are exactly those methods that are overridden in TypedTreeCopier so that they selectively retype themselves. Retyping needs a context.

abstract class TreeMap(val cpy: TreeCopier)
abstract class TreeTraverser extends TreeAccumulator[Unit]
object TypeDefs
object ValDefs

Types

type Apply = Apply[T]
type Assign = Assign[T]
type Bind = Bind[T]
type Block = Block[T]
type CaseDef = CaseDef[T]
type Closure = Closure[T]
type DefDef = DefDef[T]
type DefTree = DefTree[T]
type Export = Export[T]
type Hole = Hole[T]
type Ident = Ident[T]
type If = If[T]
type Import = Import[T]
type InlineIf = InlineIf[T]
type Inlined = Inlined[T]
type Labeled = Labeled[T]
type LazyTree = LazyTree[T]
type Literal = Literal[T]
type Match = Match[T]
type NameTree = NameTree[T]
type NamedArg = NamedArg[T]
type New = New[T]
type RefTree = RefTree[T]
type Return = Return[T]
type Select = Select[T]
type Super = Super[T]
type Template = Template[T]
type TermTree = TermTree[T]
type Thicket = Thicket[T]
type This = This[T]
type Tree = Tree[T]
type Try = Try[T]
type TypTree = TypTree[T]
type TypeDef = TypeDef[T]
type TypeTree = TypeTree[T]
type Typed = Typed[T]
type UnApply = UnApply[T]
type ValDef = ValDef[T]
type WhileDo = WhileDo[T]

Value members

Abstract methods

protected def FunProto(args: List[Tree], resType: Type)(using Context): FunProto

Delegate to FunProto or FunProtoTyped depending on whether the prefix is untpd or tpd.

Delegate to FunProto or FunProtoTyped depending on whether the prefix is untpd or tpd.

def localCtx(tree: Tree)(using Context): Context

The context to use when mapping or accumulating over a tree

The context to use when mapping or accumulating over a tree

Concrete methods

def Thicket(x1: Tree, x2: Tree)(implicit src: SourceFile): Thicket
def Thicket(x1: Tree, x2: Tree, x3: Tree)(implicit src: SourceFile): Thicket
def Thicket(xs: List[Tree])(implicit src: SourceFile): Thicket[T]
def applyOverloaded(receiver: Tree, method: TermName, args: List[Tree], targs: List[Type], expectedType: Type)(using parentCtx: Context): Tree

Construct the application $receiver.$method[$targs]($args) using overloading resolution to find a matching overload of $method if necessary. This is useful when overloading resolution needs to be performed in a phase after typer. Note that this will not perform any kind of implicit search.

Construct the application $receiver.$method[$targs]($args) using overloading resolution to find a matching overload of $method if necessary. This is useful when overloading resolution needs to be performed in a phase after typer. Note that this will not perform any kind of implicit search.

Value parameters:
expectedType

An expected type of the application used to guide overloading resolution

def flatTree(xs: List[Tree])(implicit src: SourceFile): Tree
protected def inlineContext(call: Tree)(using Context): Context

For untyped trees, this is just the identity. For typed trees, a context derived form ctx that records call as the innermost enclosing call for which the inlined version is currently processed.

For untyped trees, this is just the identity. For typed trees, a context derived form ctx that records call as the innermost enclosing call for which the inlined version is currently processed.

def joinParams(tparams: List[TypeDef], paramss: List[ParamClause]): List[ParamClause]

If tparams is non-empty, add it to the left paramss, merging it with a leading type parameter list of paramss, if one exists.

If tparams is non-empty, add it to the left paramss, merging it with a leading type parameter list of paramss, if one exists.

def rename(tree: NameTree, newName: Name)(using Context): ThisTree[T]
def resolveConstructor(atp: Type, args: List[Tree])(using Context): Tree
protected def skipTransform(tree: Tree)(using Context): Boolean

Hook to indicate that a transform of some subtree should be skipped

Hook to indicate that a transform of some subtree should be skipped

def transformCtx(tree: Tree)(using Context): Context

The context to use when transforming a tree. It ensures that the source is correct, and that the local context is used if that's necessary for transforming the whole tree. TODO: ensure transform is always called with the correct context as argument

The context to use when transforming a tree. It ensures that the source is correct, and that the local context is used if that's necessary for transforming the whole tree. TODO: ensure transform is always called with the correct context as argument

See also:

Abstract fields