tree_1 | ...
tree_1 | ... | tree_n
left & right
arg @annot
tpt[args]
fun(args)
name = arg, outside a parameter list
name @ body
{ stats; expr }
case pat if guard => body; only appears as child of a Match
A closure with an environment and a reference to a method.
mods def name[tparams](vparams_1)...(vparams_n): tpt = rhs
Tree defines a new symbol
Tree's denotation can be derived from its type
name
if cond then thenp else elsep
import expr.selectors
where a selector is either an untyped Ident
, name
or
an untyped Pair
name => rename
Array(elems)
A base trait for lazy tree fields.
A base trait for lazy tree fields. These can be instantiated with Lazy instances which can delay tree construction until the field is first demanded.
const
selector match { cases }
Tree defines a new symbol and carries modifiers.
Tree defines a new symbol and carries modifiers. The position of a MemberDef contains only the defined identifier or pattern. The envelope of a MemberDef contains the whole definition and has its point on the opening keyword (or the next token after that if keyword is missing).
Modifiers and annotations for definitions
Modifiers and annotations for definitions
The set flags
If a private or protected has is followed by a qualifier [q], the name q, "" as a typename otherwise.
The annotations preceding the modifiers
Tree has a name
name = arg, in a parameter list
new tpt, but no constructor call
left | right
package pid { stats }
(left, right)
Instances of this class are trees which are not terms but are legal parts of patterns.
Tree's denot/isType/isTerm properties come from a subtree
identified by forwardTo
.
Tree refers by name to a denotation
tpt { refinements }
return expr
where from
refers to the method from which the return takes place
After program transformations this is not necessarily the enclosing method, because
closures can intervene.
qualifier.name
qualifier # name In Scala, this always refers to a type, but in a Java compilation unit this might refer to a term.
Seq(elems)
ref.type
C.super[mix], where qual = C.this
extends parents { self => body }
Instances of this class are trees for which isTerm is definitely true.
Instances of this class are trees for which isTerm is definitely true. Note that some trees have isTerm = true without being TermTrees (e.g. Ident, AnnotatedTree)
Temporary class that results from translation of ModuleDefs (and possibly other statements).
Temporary class that results from translation of ModuleDefs
(and possibly other statements).
The contained trees will be integrated when transformed with
a transform(List[Tree])
call.
qual.this
Trees take a parameter indicating what the type of their tpe
field
is.
Trees take a parameter indicating what the type of their tpe
field
is. Two choices: Type
or Untyped
.
Untyped trees have type Tree[Untyped]
.
Tree typing uses a copy-on-write implementation:
tpe
which is null
(throws an exception)withType
we can re-use
the existing tree transparently, assigning its tpe
field,
provided it was null
before.TypedSplice
nodes.
try block catch handler finally finalizer
try block catch handler finally finalizer
Note: if the handler is a case block CASES of the form
{ case1 ... caseN }
the parser returns Match(EmptyTree, CASES). Desugaring and typing this yields a closure node
{ def $anonfun(x: Throwable) = x match CASES; Closure(Nil, $anonfun) }
At some later stage when we normalize the try we can revert this to
Match(EmptyTree, CASES)
or else if stack is non-empty
Match(EmptyTree, <case x: Throwable => $anonfun(x)>)
Instances of this class are trees for which isType is definitely true.
Instances of this class are trees for which isType is definitely true. Note that some trees have isType = true without being TypTrees (e.g. Ident, AnnotatedTree)
fun[args]
>: lo <: hi
mods class name template or mods trait name template or mods type name = rhs or mods type name >: lo <: hi, if rhs = TypeBoundsTree(lo, hi) & (lo ne hi)
[typeparams] -> tpt
A type tree that represents an existing or inferred type
expr : tpt
The typed translation of extractor(patterns)
in a pattern.
The typed translation of extractor(patterns)
in a pattern. The translation has the following
components:
mods val name: tpt = rhs
A ValDef or DefDef tree
A tree that can have a lazy field
The field is represented by some private var
which is
proxied unforced
and force
.
A tree that can have a lazy field
The field is represented by some private var
which is
proxied unforced
and force
. Forcing the field will
set the var
to the underlying value.
Attachment key for trees with documentation strings attached
The total number of created tree nodes, maintained if Stats.enabled