UntypedTreeInfo

class Object
trait Matchable
class Any
object untpd

Type members

Classlikes

object IdPattern

An extractor for trees of the form id or id: T

An extractor for trees of the form id or id: T

Inherited classlikes

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

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

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

Inherited from
Instance
class MatchingArgs(params: List[Symbol], args: List[Tree])(using x$3: Context)
Inherited from
TreeInfo
class ShallowFolder[X](f: (X, Tree) => 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.

Inherited from
Instance
abstract class TreeAccumulator[X]
Inherited from
Instance
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.

Inherited from
Instance
abstract class TreeMap(val cpy: TreeCopier)
Inherited from
Instance
abstract class TreeTraverser
Inherited from
Instance
object TypeDefs
Inherited from
Instance
object ValDefs
Inherited from
Instance

Types

type VarInfo = (NameTree, Tree)

Info of a variable in a pattern: The named tree and its type

Info of a variable in a pattern: The named tree and its type

Inherited types

Inherited from
Instance
Inherited from
Instance
type Apply = Apply[T]
Inherited from
Instance
type Assign = Assign[T]
Inherited from
Instance
type Bind = Bind[T]
Inherited from
Instance
type Block = Block[T]
Inherited from
Instance
Inherited from
Instance
type CaseDef = CaseDef[T]
Inherited from
Instance
type Closure = Closure[T]
Inherited from
Instance
type DefDef = DefDef[T]
Inherited from
Instance
type DefTree = DefTree[T]
Inherited from
Instance
Inherited from
Instance
type Export = Export[T]
Inherited from
Instance
Inherited from
Instance
type Ident = Ident[T]
Inherited from
Instance
type If = If[T]
Inherited from
Instance
type Import = Import[T]
Inherited from
Instance
Inherited from
Instance
Inherited from
Instance
Inherited from
Instance
type Inlined = Inlined[T]
Inherited from
Instance
Inherited from
Instance
type Labeled = Labeled[T]
Inherited from
Instance
Inherited from
Instance
Inherited from
Instance
Inherited from
Instance
type Literal = Literal[T]
Inherited from
Instance
type Match = Match[T]
Inherited from
Instance
Inherited from
Instance
Inherited from
Instance
Inherited from
Instance
Inherited from
Instance
Inherited from
Instance
type New = New[T]
Inherited from
Instance
Inherited from
Instance
Inherited from
Instance
Inherited from
Instance
Inherited from
Instance
type RefTree = RefTree[T]
Inherited from
Instance
type Return = Return[T]
Inherited from
Instance
type Select = Select[T]
Inherited from
Instance
Inherited from
Instance
Inherited from
Instance
type Super = Super[T]
Inherited from
Instance
Inherited from
Instance
Inherited from
Instance
type Thicket = Thicket[T]
Inherited from
Instance
type This = This[T]
Inherited from
Instance
type Tree = Tree[T]
Inherited from
Instance
type Try = Try[T]
Inherited from
Instance
type TypTree = TypTree[T]
Inherited from
Instance
Inherited from
Instance
Inherited from
Instance
type TypeDef = TypeDef[T]
Inherited from
Instance
Inherited from
Instance
type Typed = Typed[T]
Inherited from
Instance
type UnApply = UnApply[T]
Inherited from
Instance
type ValDef = ValDef[T]
Inherited from
Instance
Inherited from
Instance
Inherited from
Instance
type WhileDo = WhileDo[T]
Inherited from
Instance

Value members

Inherited constructors

def this()
Inherited from
Instance

Concrete methods

def bodyKind(body: List[<none>])(using Context): FlagSet

The largest subset of {NoInits, PureInterface} that a trait or class with this body can have as flags.

The largest subset of {NoInits, PureInterface} that a trait or class with this body can have as flags.

def functionWithUnknownParamType(tree: <none>): Option[<none>]
def isContextualClosure(tree: <none>)(using Context): Boolean

Is tree an context function or closure, possibly nested in a block?

Is tree an context function or closure, possibly nested in a block?

def isFunction(tree: <none>): Boolean
override def unsplice(tree: <none>): <none>

The underlying tree when stripping any TypedSplice or Parens nodes

The underlying tree when stripping any TypedSplice or Parens nodes

Definition Classes

Inherited 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.

Inherited from
Instance
def Thicket(xs: List[Tree])(implicit src: SourceFile): Thicket[T]
Inherited from
Instance
def Thicket(x1: Tree, x2: Tree, x3: Tree)(implicit src: SourceFile): Thicket
Inherited from
Instance
def Thicket(x1: Tree, x2: Tree)(implicit src: SourceFile): Thicket
Inherited from
Instance
Inherited from
Instance
def allParamSyms(ddef: <none>)(using Context): List[Symbol]

All type and value parameter symbols of this DefDef

All type and value parameter symbols of this DefDef

Inherited from
TreeInfo
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 Params
expectedType

An expected type of the application used to guide overloading resolution

Inherited from
Instance
def arguments(tree: <none>): List[<none>]

The (last) list of arguments of an application

The (last) list of arguments of an application

Inherited from
TreeInfo
Inherited from
Instance
def catchesAllOf(cdef: <none>, threshold: Type)(using Context): Boolean

Does this CaseDef catch everything of a certain Type?

Does this CaseDef catch everything of a certain Type?

Inherited from
TreeInfo
def catchesThrowable(cdef: <none>)(using Context): Boolean

Does this CaseDef catch Throwable?

Does this CaseDef catch Throwable?

Inherited from
TreeInfo
def firstConstructor(stats: List[<none>]): <none>

The first constructor definition in stats

The first constructor definition in stats

Inherited from
TreeInfo
def flatTree(xs: List[Tree])(implicit src: SourceFile): Tree
Inherited from
Instance
def forallResults(tree: <none>, p: <none> => Boolean): Boolean

Checks whether predicate p is true for all result parts of this expression, where we zoom into Ifs, Matches, and Blocks.

Checks whether predicate p is true for all result parts of this expression, where we zoom into Ifs, Matches, and Blocks.

Inherited from
TreeInfo
def hasNamedArg(args: List[Any]): Boolean

Does this list contain a named argument tree?

Does this list contain a named argument tree?

Inherited from
TreeInfo
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.

Inherited from
Instance
def isBackquoted(tree: <none>): Boolean

Is tree a backquoted identifier or definition

Is tree a backquoted identifier or definition

Inherited from
TreeInfo
def isDeclarationOrTypeDef(tree: <none>): Boolean
Inherited from
TreeInfo
def isDefaultCase(cdef: <none>): Boolean

Is this pattern node a catch-all (wildcard or variable) pattern?

Is this pattern node a catch-all (wildcard or variable) pattern?

Inherited from
TreeInfo
def isGuardedCase(cdef: <none>): Boolean

Is this case guarded?

Is this case guarded?

Inherited from
TreeInfo
def isOpAssign(tree: <none>): Boolean
Inherited from
TreeInfo
def isPath(tree: <none>): Boolean

Is tree a path?

Is tree a path?

Inherited from
TreeInfo
def isRepeatedParamType(tpt: <none>)(using Context): Boolean

Is tpt a vararg type of the form T* or => T*?

Is tpt a vararg type of the form T* or => T*?

Inherited from
TreeInfo
def isSelfConstrCall(tree: <none>): Boolean

Is tree a self constructor call this(...)? I.e. a call to a constructor of the same object?

Is tree a self constructor call this(...)? I.e. a call to a constructor of the same object?

Inherited from
TreeInfo
def isSelfOrSuperConstrCall(tree: <none>): Boolean
Inherited from
TreeInfo
def isSuperConstrCall(tree: <none>): Boolean

Is tree a super constructor call?

Is tree a super constructor call?

Inherited from
TreeInfo
def isSuperSelection(tree: <none>): Boolean
Inherited from
TreeInfo
def isSyntheticDefaultCase(cdef: <none>): Boolean

Is this pattern node a synthetic catch-all case, added during PartialFuction synthesis before we know whether the user provided cases are exhaustive.

Is this pattern node a synthetic catch-all case, added during PartialFuction synthesis before we know whether the user provided cases are exhaustive.

Inherited from
TreeInfo
Inherited from
Instance
def isTypeParamClause(params: <none>)(using Context): Boolean
Inherited from
TreeInfo
def isUsingClause(params: <none>)(using Context): Boolean

Is this parameter list a using clause?

Is this parameter list a using clause?

Inherited from
TreeInfo
def isUsingOrTypeParamClause(params: <none>)(using Context): Boolean
Inherited from
TreeInfo
def isVarPattern(pat: <none>): Boolean

Is tree a variable pattern?

Is tree a variable pattern?

Inherited from
TreeInfo
def isWildcardArg(tree: <none>): Boolean

Is the argument a wildcard argument of the form _ or x @ _?

Is the argument a wildcard argument of the form _ or x @ _?

Inherited from
TreeInfo
def isWildcardStarArg(tree: <none>)(using Context): Boolean

Is this argument node of the form *, or is it a reference to such an argument ? The latter case can happen when an argument is lifted.

Is this argument node of the form *, or is it a reference to such an argument ? The latter case can happen when an argument is lifted.

Inherited from
TreeInfo
def isWildcardStarArgList(trees: List[<none>])(using Context): Boolean

Does this argument list end with an argument of the form : _* ?

Does this argument list end with an argument of the form : _* ?

Inherited from
TreeInfo
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.

Inherited from
Instance
def languageImport(path: <none>): Option[TermName]

If path looks like a language import, Some(name) where name is experimental if that sub-module is imported, and the empty term name otherwise.

If path looks like a language import, Some(name) where name is experimental if that sub-module is imported, and the empty term name otherwise.

Inherited from
TreeInfo
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

Inherited from
Instance
def methPart(tree: <none>): <none>

The method part of an application node, possibly enclosed in a block with only valdefs as statements. the reason for also considering blocks is that named arguments can transform a call into a block, e.g. (b = foo, a = bar) is transformed to { val x$1 = foo val x$2 = bar (x$2, x$1) }

The method part of an application node, possibly enclosed in a block with only valdefs as statements. the reason for also considering blocks is that named arguments can transform a call into a block, e.g. (b = foo, a = bar) is transformed to { val x$1 = foo val x$2 = bar (x$2, x$1) }

Inherited from
TreeInfo
def numArgs(tree: <none>): Int

The number of arguments in an application

The number of arguments in an application

Inherited from
TreeInfo
def parentsKind(parents: List[<none>])(using Context): FlagSet

The largest subset of {NoInits, PureInterface} that a trait or class with these parents can have as flags.

The largest subset of {NoInits, PureInterface} that a trait or class with these parents can have as flags.

Inherited from
TreeInfo
def rename(tree: NameTree, newName: Name)(using Context): ThisTree[T]
Inherited from
Instance
def resolveConstructor(atp: Type, args: List[Tree])(using Context): Tree
Inherited from
Instance
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

Inherited from
Instance
def stripAnnotated(tree: <none>): <none>
Inherited from
TreeInfo
def stripApply(tree: <none>): <none>

If this is an application, its function part, stripping all Apply nodes (but leaving TypeApply nodes in). Otherwise the tree itself.

If this is an application, its function part, stripping all Apply nodes (but leaving TypeApply nodes in). Otherwise the tree itself.

Inherited from
TreeInfo
def stripBlock(tree: <none>): <none>

If this is a block, its expression part

If this is a block, its expression part

Inherited from
TreeInfo
def stripInlined(tree: <none>): <none>
Inherited from
TreeInfo
Inherited from
Instance
def unbind(x: <none>): <none>

The underlying pattern ignoring any bindings

The underlying pattern ignoring any bindings

Inherited from
TreeInfo

Inherited fields

Inherited from
Instance
Inherited from
Instance
Inherited from
Instance
val isNamedArg: Any => Boolean
Inherited from
TreeInfo