dotty.tools.dotc.ast

Members list

Type members

Classlikes

object DesugarEnums

Helper methods to desugar enums

Helper methods to desugar enums

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object MainProxies

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object NavigateAST

Utility functions to go from typed to untyped ASTs

Utility functions to go from typed to untyped ASTs

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
abstract class Positioned(implicit src: SourceFile) extends SrcPos, Product, Cloneable

A base class for things that have positions (currently: modifiers and trees)

A base class for things that have positions (currently: modifiers and trees)

Attributes

Companion
object
Supertypes
trait Cloneable
trait Product
trait Equals
trait SrcPos
class Object
trait Matchable
class Any
Show all
Known subtypes
class Tree[T]
class Block[T]
class XMLBlock
class CaseDef[T]
class DenotingTree[T]
trait DefTree[T]
class NamedDefTree[T]
class Bind[T]
class MemberDef[T]
class TypeDef[T]
class ValOrDefDef[T]
class DefDef[T]
class ValDef[T]
class EmptyValDef[T]
trait ValOrTypeDef[T]
class ModuleDef
class Template[T]
class ImportOrExport[T]
class Export[T]
class Import[T]
class NameTree[T]
class Labeled[T]
class RefTree[T]
class Ident[T]
class Select[T]
class SelectWithSig[T]
class This[T]
class TypeTree[T]
class InferredTypeTree[T]
class TermRefTree
class TypeRefTree
class Hole[T]
class Inlined[T]
class Literal[T]
class NamedArg[T]
class New[T]
trait PatternTree[T]
class Alternative[T]
class UnApply[T]
class ProxyTree[T]
class Annotated[T]
class AppliedTypeTree[T]
class GenericApply[T]
class Apply[T]
class TypeApply[T]
class PackageDef[T]
class RefinedTypeTree[T]
class Super[T]
class Typed[T]
class Parens
class TypedSplice
class SeqLiteral[T]
class JavaSeqLiteral[T]
trait TermTree[T]
class Assign[T]
class Closure[T]
class If[T]
class InlineIf[T]
class Match[T]
class InlineMatch[T]
class Quote[T]
class Return[T]
class Splice[T]
class SplicePattern[T]
class Try[T]
class WhileDo[T]
class Thicket[T]
class EmptyTree[T]
trait TypTree[T]
class ByNameTypeTree[T]
class LambdaTypeTree[T]
class MatchTypeTree[T]
class TypeBoundsTree[T]
trait WithoutTypeOrPos[T]
class ExtMethods
class Function
class GenAlias
class GenFrom
class Into
class MacroTree
class OpTree
class InfixOp
class PostfixOp
class PrefixOp
class PolyFunction
class Tuple
class Mod
class Abstract
class Erased
class Final
class Given
class Implicit
class Impure
class Infix
class Inline
class Lazy
class Opaque
class Open
class Override
class Private
class Protected
class Sealed
class Transparent
class Var
Show all
object Positioned

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Positioned.type
trait TreeInfo[T <: Untyped]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object tpd
object untpd
Self type
object TreeInfo

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
TreeInfo.type

A TreeMap that maintains the necessary infrastructure to support contextual implicit searches (type-scope implicits are supported anyway).

A TreeMap that maintains the necessary infrastructure to support contextual implicit searches (type-scope implicits are supported anyway).

This incudes implicits defined in scope as well as imported implicits.

Attributes

Supertypes
class TreeMap
class Object
trait Matchable
class Any
Known subtypes
class TreeTypeMap(val typeMap: Type => Type, val treeMap: Tree => Tree, val oldOwners: List[Symbol], val newOwners: List[Symbol], val substFrom: List[Symbol], val substTo: List[Symbol], cpy: TreeCopier)(using x$8: Context) extends TreeMap

A map that applies three functions and a substitution together to a tree and makes sure they are coordinated so that the result is well-typed. The functions are

A map that applies three functions and a substitution together to a tree and makes sure they are coordinated so that the result is well-typed. The functions are

Value parameters

newOwners

New owners, replacing previous owners.

oldOwners

Previous owners. If a top-level local symbol in the mapped tree has one of these as an owner, the owner is replaced by the corresponding symbol in newOwners.

substFrom

The symbols that need to be substituted.

substTo

The substitution targets. The reason the substitution is broken out from the rest of the type map is that all symbols have to be substituted at the same time. If we do not do this, we risk data races on named types. Example: Say we have outer#1.inner#2 and we have two substitutions S1 = [outer#1 := outer#3], S2 = [inner#2 := inner#4] where hashtags precede symbol ids. If we do S1 first, we get outer#2.inner#3. If we then do S2 we get outer#2.inner#4. But that means that the named type outer#2.inner gets two different denotations in the same period. Hence, if -Yno-double-bindings is set, we would get a data race assertion error.

treeMap

A transformer that translates all encountered subtrees in prefix traversal orders

typeMap

A function from Type to Type that gets applied to the type of every tree node and to all locally defined symbols, followed by the substitution [substFrom := substTo].

Attributes

Supertypes
class TreeMap
class Object
trait Matchable
class Any
object Trees

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Trees.type
trait TypedTreeInfo extends TreeInfo[Type]

Attributes

Supertypes
trait TreeInfo[Type]
class Object
trait Matchable
class Any
Known subtypes
object tpd
Self type

Attributes

Supertypes
trait TreeInfo[Untyped]
class Object
trait Matchable
class Any
Known subtypes
object untpd
Self type
object desugar

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
desugar.type
object tpd extends Instance[Type], TypedTreeInfo

Some creators for typed trees

Some creators for typed trees

Attributes

Supertypes
trait TreeInfo[Type]
class Instance[Type]
class Object
trait Matchable
class Any
Show all
Self type
tpd.type

Attributes

Supertypes
trait TreeInfo[Untyped]
class Instance[Untyped]
class Object
trait Matchable
class Any
Show all
Self type
untpd.type