final object Trees

Constructors

Members

case class Alternative

tree_1 | ... | tree_n

tree_1 | ... | tree_n

final object Alternative

tree_1 | ... | tree_n

tree_1 | ... | tree_n

case class AndTypeTree

left & right

left & right

final object AndTypeTree

left & right

left & right

case class Annotated

arg @annot

arg @annot

final object Annotated

arg @annot

arg @annot

case class AppliedTypeTree

tpt[args]

tpt[args]

final object AppliedTypeTree

tpt[args]

tpt[args]

case class Apply

fun(args)

fun(args)

final object Apply

fun(args)

fun(args)

case class Assign

name = arg, outside a parameter list

name = arg, outside a parameter list

final object Assign

name = arg, outside a parameter list

name = arg, outside a parameter list

class BackquotedIdent
case class Bind

name @ body

name @ body

final object Bind

name @ body

name @ body

case class Block

{ stats; expr }

{ stats; expr }

final object Block

{ stats; expr }

{ stats; expr }

case class ByNameTypeTree

=> T

=> T

final object ByNameTypeTree

=> T

=> T

case class CaseDef

case pat if guard => body; only appears as child of a Match

case pat if guard => body; only appears as child of a Match

final object CaseDef

case pat if guard => body; only appears as child of a Match

case pat if guard => body; only appears as child of a Match

case class Closure

A closure with an environment and a reference to a method.

A closure with an environment and a reference to a method.

final object Closure

A closure with an environment and a reference to a method.

A closure with an environment and a reference to a method.

case class DefDef

mods def nametparams...(vparams_n): tpt = rhs

mods def nametparams...(vparams_n): tpt = rhs

final object DefDef

mods def nametparams...(vparams_n): tpt = rhs

mods def nametparams...(vparams_n): tpt = rhs

trait DefTree

Tree defines a new symbol

Tree defines a new symbol

abstract class DenotingTree

Tree's denotation can be derived from its type

Tree's denotation can be derived from its type

class EmptyValDef
abstract class GenericApply
case class Ident

name

name

final object Ident

name

name

case class If

if cond then thenp else elsep

if cond then thenp else elsep

final object If

if cond then thenp else elsep

if cond then thenp else elsep

case class Import

import expr.selectors where a selector is either an untyped Ident, name or an untyped thicket consisting of name and rename.

import expr.selectors where a selector is either an untyped Ident, name or an untyped thicket consisting of name and rename.

final object Import

import expr.selectors where a selector is either an untyped Ident, name or an untyped thicket consisting of name and rename.

import expr.selectors where a selector is either an untyped Ident, name or an untyped thicket consisting of name and rename.

case class Inlined

A tree representing inlined code.

A tree representing inlined code.

final object Inlined

A tree representing inlined code.

A tree representing inlined code.

abstract class Instance
class JavaSeqLiteral

Array(elems)

Array(elems)

case class LambdaTypeTree

[typeparams] -> tpt

[typeparams] -> tpt

final object LambdaTypeTree

[typeparams] -> tpt

[typeparams] -> tpt

trait Lazy

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.

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.

case class Literal

const

const

final object Literal

const

const

case class Match

selector match { cases }

selector match { cases }

final object Match

selector match { cases }

selector match { cases }

[+] abstract class MemberDef

Tree defines a new symbol and carries modifiers. The position of a MemberDef contains only the defined identifier or pattern. The envelope of a MemberDe...

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

abstract class NameTree

Tree has a name

Tree has a name

case class NamedArg

name = arg, in a parameter list

name = arg, in a parameter list

final object NamedArg

name = arg, in a parameter list

name = arg, in a parameter list

case class New

new tpt, but no constructor call

new tpt, but no constructor call

final object New

new tpt, but no constructor call

new tpt, but no constructor call

case class OrTypeTree

left | right

left | right

final object OrTypeTree

left | right

left | right

case class PackageDef

package pid { stats }

package pid { stats }

final object PackageDef

package pid { stats }

package pid { stats }

trait PatternTree

Instances of this class are trees which are not terms but are legal parts of patterns.

Instances of this class are trees which are not terms but are legal parts of patterns.

abstract class ProxyTree

Tree's denot/isType/isTerm properties come from a subtree identified by forwardTo.

Tree's denot/isType/isTerm properties come from a subtree identified by forwardTo.

abstract class RefTree

Tree refers by name to a denotation

Tree refers by name to a denotation

case class RefinedTypeTree

tpt { refinements }

tpt { refinements }

final object RefinedTypeTree

tpt { refinements }

tpt { refinements }

[+] case class Return

return expr where from refers to the method from which the return takes place After program transformations this is not necessarily the enclosing method...

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.

[+] final object Return

return expr where from refers to the method from which the return takes place After program transformations this is not necessarily the enclosing method...

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.

case class Select

qualifier.name, or qualifier#name, if qualifier is a type

qualifier.name, or qualifier#name, if qualifier is a type

final object Select

qualifier.name, or qualifier#name, if qualifier is a type

qualifier.name, or qualifier#name, if qualifier is a type

class SelectWithSig
case class SeqLiteral

Seq(elems)

Seq(elems)

final object SeqLiteral

Seq(elems)

Seq(elems)

case class SingletonTypeTree

ref.type

ref.type

final object SingletonTypeTree

ref.type

ref.type

case class Super

C.super[mix], where qual = C.this

C.super[mix], where qual = C.this

final object Super

C.super[mix], where qual = C.this

C.super[mix], where qual = C.this

case class Template

extends parents { self => body }

extends parents { self => body }

final object Template

extends parents { self => body }

extends parents { self => body }

[+] trait TermTree

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, Ann...

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)

[+] case class Thicket

Temporary class that results from translation of ModuleDefs (and possibly other statements). The contained trees will be integrated when transformed wit...

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.

[+] final object Thicket

Temporary class that results from translation of ModuleDefs (and possibly other statements). The contained trees will be integrated when transformed wit...

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.

case class This

qual.this

qual.this

final object This

qual.this

qual.this

[+] abstract class Tree

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

    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:

    • You can never observe a tpe which is null (throws an exception)
    • So when creating a typed tree with withType we can re-use the existing tree transparently, assigning its tpe field, provided it was null before.
    • It is impossible to embed untyped trees in typed ones.
    • Typed trees can be embedded in untyped ones provided they are rooted in a TypedSplice node.
    • Type checking an untyped tree should remove all embedded TypedSplice nodes.
    [+] case class Try

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

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

    [+] final object Try

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

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

    [+] trait TypTree

    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, Anno...

    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)

    case class TypeApply

    fun[args]

    fun[args]

    final object TypeApply

    fun[args]

    fun[args]

    case class TypeBoundsTree

    : lo <: hi

    : lo <: hi

    final object TypeBoundsTree

    : lo <: hi

    : lo <: hi

    [+] case class TypeDef

    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) & (...

    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)

    [+] final object TypeDef

    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) & (...

    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)

    case class TypeTree

    A type tree that represents an existing or inferred type

    A type tree that represents an existing or inferred type

    final object TypeTree

    A type tree that represents an existing or inferred type

    A type tree that represents an existing or inferred type

    case class Typed

    expr : tpt

    expr : tpt

    final object Typed

    expr : tpt

    expr : tpt

    case class UnApply

    The typed translation of extractor(patterns) in a pattern. The translation has the following components:

    The typed translation of extractor(patterns) in a pattern. The translation has the following components:

    final object UnApply

    The typed translation of extractor(patterns) in a pattern. The translation has the following components:

    The typed translation of extractor(patterns) in a pattern. The translation has the following components:

    case class ValDef

    mods val name: tpt = rhs

    mods val name: tpt = rhs

    final object ValDef

    mods val name: tpt = rhs

    mods val name: tpt = rhs

    trait ValOrDefDef

    A ValDef or DefDef tree

    A ValDef or DefDef tree

    [+] trait WithLazyField

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

    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.

    trait WithoutTypeOrPos
    type LazyTree = AnyRef
    type LazyTreeList = AnyRef
    type Untyped = Null
    val DocComment : Key [ Comment ]

    Property key for trees with documentation strings attached

    Property key for trees with documentation strings attached

    @sharable private var nextId : Int
    @sharable var ntrees : Int

    The total number of created tree nodes, maintained if Stats.enabled

    The total number of created tree nodes, maintained if Stats.enabled

    @sharable val theEmptyTree : Thicket [ Type ]
    @sharable val theEmptyValDef : EmptyValDef [ Type ]
    def flatten ( trees: List [ Tree [ T ] ] ) : List [ Tree [ T ] ]
    def genericEmptyTree : Thicket [ T ]
    def genericEmptyValDef : ValDef [ T ]
    @sharable private def nextId_= ( x$1: Int ) : Unit
    @sharable def ntrees_= ( x$1: Int ) : Unit

    The total number of created tree nodes, maintained if Stats.enabled

    The total number of created tree nodes, maintained if Stats.enabled