TreeCopier

dotty.tools.dotc.ast.Trees.Instance.TreeCopier
abstract class TreeCopier

A class for copying trees. The copy methods avoid creating a new tree If all arguments stay the same.

Note: Some of the copy methods take a context. These are exactly those methods that are overridden in TypedTreeCopier so that they selectively retype themselves. Retyping needs a context.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

protected def postProcess(tree: Tree, copied: Tree): copied.ThisTree[T]
protected def postProcess(tree: Tree, copied: MemberDef): copied.ThisTree[T]

Concrete methods

def Alternative(tree: Tree)(trees: List[Tree])(using Context): Alternative
def Annotated(tree: Tree)(arg: Tree, annot: Tree)(using Context): Annotated
def AppliedTypeTree(tree: Tree)(tpt: Tree, args: List[Tree])(using Context): AppliedTypeTree
def Apply(tree: Tree)(fun: Tree, args: List[Tree])(using Context): Apply
def Assign(tree: Tree)(lhs: Tree, rhs: Tree)(using Context): Assign
def Bind(tree: Tree)(name: Name, body: Tree)(using Context): Bind
def Block(tree: Tree)(stats: List[Tree], expr: Tree)(using Context): Block
def ByNameTypeTree(tree: Tree)(result: Tree)(using Context): ByNameTypeTree
def CaseDef(tree: Tree)(pat: Tree, guard: Tree, body: Tree)(using Context): CaseDef
def CaseDef(tree: CaseDef)(pat: Tree, guard: Tree, body: Tree)(using Context): CaseDef
def Closure(tree: Tree)(env: List[Tree], meth: Tree, tpt: Tree)(using Context): Closure
def Closure(tree: Closure)(env: List[Tree], meth: Tree, tpt: Tree)(using Context): Closure
def DefDef(tree: Tree)(name: TermName, paramss: List[ParamClause], tpt: Tree, rhs: LazyTree)(using Context): DefDef
def DefDef(tree: DefDef)(name: TermName, paramss: List[ParamClause], tpt: Tree, rhs: LazyTree)(using Context): DefDef
def Export(tree: Tree)(expr: Tree, selectors: List[ImportSelector])(using Context): Export
def Hole(tree: Tree)(isTerm: Boolean, idx: Int, args: List[Tree], content: Tree)(using Context): Hole
def Hole(tree: Hole)(isTerm: Boolean, idx: Int, args: List[Tree], content: Tree)(using Context): Hole
def Ident(tree: Tree)(name: Name)(using Context): Ident
def If(tree: Tree)(cond: Tree, thenp: Tree, elsep: Tree)(using Context): If
def If(tree: If)(cond: Tree, thenp: Tree, elsep: Tree)(using Context): If
def Import(tree: Tree)(expr: Tree, selectors: List[ImportSelector])(using Context): Import
def Inlined(tree: Tree)(call: Tree, bindings: List[MemberDef], expansion: Tree)(using Context): Inlined
def Labeled(tree: Tree)(bind: Bind, expr: Tree)(using Context): Labeled
def LambdaTypeTree(tree: Tree)(tparams: List[TypeDef], body: Tree)(using Context): LambdaTypeTree
def Literal(tree: Tree)(const: Constant)(using Context): Literal
def Match(tree: Tree)(selector: Tree, cases: List[CaseDef])(using Context): Match
def MatchTypeTree(tree: Tree)(bound: Tree, selector: Tree, cases: List[CaseDef])(using Context): MatchTypeTree
def NamedArg(tree: Tree)(name: Name, arg: Tree)(using Context): NamedArg
def New(tree: Tree)(tpt: Tree)(using Context): New
def PackageDef(tree: Tree)(pid: RefTree, stats: List[Tree])(using Context): PackageDef
def Quote(tree: Tree)(body: Tree, tags: List[Tree])(using Context): Quote
def QuotePattern(tree: Tree)(bindings: List[Tree], body: Tree, quotes: Tree)(using Context): QuotePattern
def Ref(tree: RefTree)(name: Name)(using Context): RefTree

Copy Ident or Select trees

Copy Ident or Select trees

Attributes

def RefinedTypeTree(tree: Tree)(tpt: Tree, refinements: List[Tree])(using Context): RefinedTypeTree
def Return(tree: Tree)(expr: Tree, from: Tree)(using Context): Return
def Select(tree: Tree)(qualifier: Tree, name: Name)(using Context): Select
def SeqLiteral(tree: Tree)(elems: List[Tree], elemtpt: Tree)(using Context): SeqLiteral
def Splice(tree: Tree)(expr: Tree)(using Context): Splice
def SplicePattern(tree: Tree)(body: Tree, args: List[Tree])(using Context): SplicePattern
def Super(tree: Tree)(qual: Tree, mix: Ident)(using Context): Super
def Template(tree: Tree)(constr: DefDef, parents: List[Tree], derived: List[Tree], self: ValDef, body: LazyTreeList)(using Context): Template
def Template(tree: Template)(using Context)(constr: DefDef, parents: List[Tree], derived: List[Tree], self: ValDef, body: LazyTreeList): Template
def TermLambdaTypeTree(tree: Tree)(params: List[ValDef], body: Tree)(using Context): TermLambdaTypeTree
def Thicket(tree: Tree)(trees: List[Tree])(using Context): Thicket
def This(tree: Tree)(qual: Ident)(using Context): This
def Try(tree: Tree)(expr: Tree, cases: List[CaseDef], finalizer: Tree)(using Context): Try
def Try(tree: Try)(expr: Tree, cases: List[CaseDef], finalizer: Tree)(using Context): Try
def TypeApply(tree: Tree)(fun: Tree, args: List[Tree])(using Context): TypeApply
def TypeBoundsTree(tree: Tree)(lo: Tree, hi: Tree, alias: Tree)(using Context): TypeBoundsTree
def TypeDef(tree: Tree)(name: TypeName, rhs: Tree)(using Context): TypeDef
def TypeDef(tree: TypeDef)(name: TypeName, rhs: Tree)(using Context): TypeDef
def Typed(tree: Tree)(expr: Tree, tpt: Tree)(using Context): Typed
def UnApply(tree: Tree)(fun: Tree, implicits: List[Tree], patterns: List[Tree])(using Context): UnApply
def UnApply(tree: UnApply)(fun: Tree, implicits: List[Tree], patterns: List[Tree])(using Context): UnApply
def ValDef(tree: Tree)(name: TermName, tpt: Tree, rhs: LazyTree)(using Context): ValDef
def ValDef(tree: ValDef)(name: TermName, tpt: Tree, rhs: LazyTree)(using Context): ValDef
def WhileDo(tree: Tree)(cond: Tree, body: Tree)(using Context): WhileDo
protected def finalize(tree: Tree, copied: Tree): copied.ThisTree[T]
protected def finalize(tree: Tree, copied: MemberDef): copied.ThisTree[T]
protected def sourceFile(tree: Tree): SourceFile

Soucre of the copied tree

Soucre of the copied tree

Attributes