dotty.tools.dotc.ast

Trees

Related Doc: package ast

object Trees

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Trees
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class Alternative[-T >: Untyped] extends Tree[T] with PatternTree[T] with Product with Serializable

    tree_1 | ...

    tree_1 | ... | tree_n

  2. case class AndTypeTree[-T >: Untyped] extends Tree[T] with TypTree[T] with Product with Serializable

    left & right

  3. case class Annotated[-T >: Untyped] extends ProxyTree[T] with Product with Serializable

    arg @annot

  4. case class AppliedTypeTree[-T >: Untyped] extends ProxyTree[T] with TypTree[T] with Product with Serializable

    tpt[args]

  5. case class Apply[-T >: Untyped] extends GenericApply[T] with Product with Serializable

    fun(args)

  6. case class Assign[-T >: Untyped] extends Tree[T] with TermTree[T] with Product with Serializable

    name = arg, outside a parameter list

  7. class BackquotedIdent[-T >: Untyped] extends Ident[T]

  8. case class Bind[-T >: Untyped] extends NameTree[T] with DefTree[T] with PatternTree[T] with Product with Serializable

    name @ body

  9. case class Block[-T >: Untyped] extends Tree[T] with TermTree[T] with Product with Serializable

    { stats; expr }

  10. case class ByNameTypeTree[-T >: Untyped] extends Tree[T] with TypTree[T] with Product with Serializable

    > T

  11. case class CaseDef[-T >: Untyped] extends Tree[T] with Product with Serializable

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

  12. case class Closure[-T >: Untyped] extends Tree[T] with TermTree[T] with Product with Serializable

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

  13. case class DefDef[-T >: Untyped] extends MemberDef[T] with ValOrDefDef[T] with Product with Serializable

    mods def name[tparams](vparams_1)...(vparams_n): tpt = rhs

  14. trait DefTree[-T >: Untyped] extends DenotingTree[T]

    Tree defines a new symbol

  15. abstract class DenotingTree[-T >: Untyped] extends Tree[T]

    Tree's denotation can be derived from its type

  16. class EmptyValDef[T >: Untyped] extends ValDef[T] with WithoutTypeOrPos[T]

  17. abstract class GenericApply[-T >: Untyped] extends ProxyTree[T] with TermTree[T]

  18. case class Ident[-T >: Untyped] extends RefTree[T] with Product with Serializable

    name

  19. case class If[-T >: Untyped] extends Tree[T] with TermTree[T] with Product with Serializable

    if cond then thenp else elsep

  20. case class Import[-T >: Untyped] extends DenotingTree[T] with Product with Serializable

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

  21. case class Inlined[-T >: Untyped] extends Tree[T] with Product with Serializable

    A tree representing inlined code.

  22. abstract class Instance[T >: Untyped <: Type] extends DotClass

  23. class JavaSeqLiteral[T >: Untyped] extends SeqLiteral[T]

    Array(elems)

  24. trait Lazy[T <: AnyRef] extends AnyRef

    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.

  25. type LazyTree = AnyRef

  26. type LazyTreeList = AnyRef

  27. case class Literal[-T >: Untyped] extends Tree[T] with TermTree[T] with Product with Serializable

    const

  28. case class Match[-T >: Untyped] extends Tree[T] with TermTree[T] with Product with Serializable

    selector match { cases }

  29. abstract class MemberDef[-T >: Untyped] extends NameTree[T] with DefTree[T]

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

  30. abstract class NameTree[-T >: Untyped] extends DenotingTree[T]

    Tree has a name

  31. case class NamedArg[-T >: Untyped] extends Tree[T] with Product with Serializable

    name = arg, in a parameter list

  32. case class New[-T >: Untyped] extends Tree[T] with TermTree[T] with Product with Serializable

    new tpt, but no constructor call

  33. case class OrTypeTree[-T >: Untyped] extends Tree[T] with TypTree[T] with Product with Serializable

    left | right

  34. case class PackageDef[-T >: Untyped] extends ProxyTree[T] with Product with Serializable

    package pid { stats }

  35. trait PatternTree[-T >: Untyped] extends Tree[T]

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

  36. case class PolyTypeTree[-T >: Untyped] extends Tree[T] with TypTree[T] with Product with Serializable

    [typeparams] -> tpt

  37. abstract class ProxyTree[-T >: Untyped] extends Tree[T]

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

  38. abstract class RefTree[-T >: Untyped] extends NameTree[T]

    Tree refers by name to a denotation

  39. case class RefinedTypeTree[-T >: Untyped] extends ProxyTree[T] with TypTree[T] with Product with Serializable

    tpt { refinements }

  40. case class Return[-T >: Untyped] extends Tree[T] with TermTree[T] with Product with Serializable

    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.

  41. case class Select[-T >: Untyped] extends RefTree[T] with Product with Serializable

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

  42. class SelectWithSig[-T >: Untyped] extends Select[T]

  43. case class SeqLiteral[-T >: Untyped] extends Tree[T] with Product with Serializable

    Seq(elems)

  44. case class SingletonTypeTree[-T >: Untyped] extends DenotingTree[T] with TypTree[T] with Product with Serializable

    ref.type

  45. case class Super[-T >: Untyped] extends ProxyTree[T] with TermTree[T] with Product with Serializable

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

  46. case class Template[-T >: Untyped] extends DenotingTree[T] with DefTree[T] with WithLazyField[List[Tree[T]]] with Product with Serializable

    extends parents { self => body }

  47. trait TermTree[-T >: Untyped] extends Tree[T]

    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)

  48. case class Thicket[-T >: Untyped](trees: List[Tree[T]]) extends Tree[T] with WithoutTypeOrPos[T] with Product with Serializable

    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.

  49. case class This[-T >: Untyped] extends DenotingTree[T] with TermTree[T] with Product with Serializable

    qual.this

  50. abstract class Tree[-T >: Untyped] extends Positioned with Product with Container with Showable with Cloneable

    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:

    • 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.
  51. case class Try[-T >: Untyped] extends Tree[T] with TermTree[T] with Product with Serializable

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

  52. trait TypTree[-T >: Untyped] extends Tree[T]

    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)

  53. case class TypeApply[-T >: Untyped] extends GenericApply[T] with Product with Serializable

    fun[args]

  54. case class TypeBoundsTree[-T >: Untyped] extends Tree[T] with TypTree[T] with Product with Serializable

    >: lo <: hi

  55. case class TypeDef[-T >: Untyped] extends MemberDef[T] with Product with Serializable

    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)

  56. case class TypeTree[-T >: Untyped]() extends DenotingTree[T] with TypTree[T] with Product with Serializable

    A type tree that represents an existing or inferred type

  57. case class Typed[-T >: Untyped] extends ProxyTree[T] with TermTree[T] with Product with Serializable

    expr : tpt

  58. case class UnApply[-T >: Untyped] extends Tree[T] with PatternTree[T] with Product with Serializable

    The typed translation of extractor(patterns) in a pattern.

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

  59. class UnAssignedTypeException[T >: Untyped] extends RuntimeException

  60. type Untyped = Null

  61. case class ValDef[-T >: Untyped] extends MemberDef[T] with ValOrDefDef[T] with Product with Serializable

    mods val name: tpt = rhs

  62. trait ValOrDefDef[-T >: Untyped] extends MemberDef[T] with WithLazyField[Tree[T]]

    A ValDef or DefDef tree

  63. trait WithLazyField[+T <: AnyRef] extends AnyRef

    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.

  64. trait WithoutTypeOrPos[-T >: Untyped] extends Tree[T]

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. val DocComment: Key[Comment]

    Property key for trees with documentation strings attached

  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def flatten[T >: Untyped](trees: List[Tree[T]]): List[Tree[T]]

  11. def genericEmptyTree[T >: Untyped]: Thicket[T]

  12. def genericEmptyValDef[T >: Untyped]: ValDef[T]

  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  19. var ntrees: Int

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

  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  21. val theEmptyTree: Thicket[Type]

  22. val theEmptyValDef: EmptyValDef[Type]

  23. def toString(): String

    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped