UntypedTreeInfo

dotty.tools.dotc.ast.UntypedTreeInfo

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object untpd.type
Self type

Members list

Concise view

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

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Under pureFunctions: A builder and extractor for => T, which is an alias for {*}-> T. Only trees of the form => T are matched; trees written directly as {*}-> T are ignored by the extractor.

Under pureFunctions: A builder and extractor for => T, which is an alias for {*}-> T. Only trees of the form => T are matched; trees written directly as {*}-> T are ignored by the extractor.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Inherited classlikes

class MatchingArgs(params: List[Symbol], args: List[Tree])(using x$3: Context)

Attributes

Inherited from:
TreeInfo
Graph
Supertypes
class Object
trait Matchable
class Any

Types

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

Attributes

Value members

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.

Attributes

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?

Attributes

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

The underlying tree when stripping any TypedSplice or Parens nodes

The underlying tree when stripping any TypedSplice or Parens nodes

Attributes

Definition Classes

Inherited methods

def allArguments(tree: <none>): List[Tree]

All term arguments of an application in a single flattened list

All term arguments of an application in a single flattened list

Attributes

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

Attributes

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

Attributes

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

Does this CaseDef catch Throwable?

Does this CaseDef catch Throwable?

Attributes

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

The first constructor definition in stats

The first constructor definition in stats

Attributes

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

Attributes

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

Is tree explicitly parameterized with type arguments?

Is tree explicitly parameterized with type arguments?

Attributes

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?

Attributes

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

Is tree a backquoted identifier or definition

Is tree a backquoted identifier or definition

Attributes

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

Is tree a type tree of the form => T or (under pureFunctions) {refs}-> T?

Is tree a type tree of the form => T or (under pureFunctions) {refs}-> T?

Attributes

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

Attributes

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?

Attributes

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

Is this case guarded?

Is this case guarded?

Attributes

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

Attributes

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

Is tree a path?

Is tree a path?

Attributes

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*?

Attributes

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?

Attributes

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

Attributes

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

Is tree a super constructor call?

Is tree a super constructor call?

Attributes

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

Attributes

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

Attributes

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

Is this parameter list a using clause?

Is this parameter list a using clause?

Attributes

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

Attributes

Inherited from:
TreeInfo
def isVarPattern(pat: <none>): Boolean

Is tree a variable pattern?

Is tree a variable pattern?

Attributes

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 @ _?

Attributes

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.

Attributes

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 : _* ?

Attributes

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

Attributes

Inherited from:
TreeInfo
def methPart(tree: <none>): Tree

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) }

Attributes

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

The number of arguments in an application

The number of arguments in an application

Attributes

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.

Attributes

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

Attributes

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

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.

Attributes

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

If this is a block, its expression part

If this is a block, its expression part

Attributes

Inherited from:
TreeInfo
def stripByNameType(tree: <none>)(using Context): Tree

Strip => T to T and (under pureFunctions) {refs}-> T to T

Strip => T to T and (under pureFunctions) {refs}-> T to T

Attributes

Inherited from:
TreeInfo
def stripInlined(tree: <none>): Tree

Attributes

Inherited from:
TreeInfo
def unbind(x: <none>): Tree

The underlying pattern ignoring any bindings

The underlying pattern ignoring any bindings

Attributes

Inherited from:
TreeInfo

Inherited fields

val isNamedArg: Any => Boolean

Attributes

Inherited from:
TreeInfo