TreeMapWithStages

The main transformer class

Value Params
level

the current level, where quotes add one and splices subtract one level. The initial level is 0, a level l where l > 0 implies code has been quoted l times and l == -1 is code inside a top level splice (in an inline method).

levels

a stacked map from symbols to the levels in which they were defined

Companion
object
class TreeMap
class Object
trait Matchable
class Any

Value members

Concrete methods

override def transform(tree: Tree)(using Context): Tree
Definition Classes

Inherited methods

def transform(trees: List[Tree])(using Context): List[Tree]
Inherited from
TreeMap
Inherited from
TreeMap
Inherited from
TreeMap
Inherited from
TreeMapWithImplicits
override def transformStats(stats: List[Tree], exprOwner: Symbol)(using Context): List[Tree]

Transform statements, while maintaining import contexts and expression contexts in the same way as Typer does. The code addresses additional concerns:

Transform statements, while maintaining import contexts and expression contexts in the same way as Typer does. The code addresses additional concerns:

  • be tail-recursive where possible
  • don't re-allocate trees where nothing has changed
Definition Classes
Inherited from
TreeMapWithImplicits
def transformSub[Tr <: Tree](trees: List[Tr])(using Context): List[Tr]
Inherited from
TreeMap
def transformSub[Tr <: Tree](tree: Tr)(using Context): Tr
Inherited from
TreeMap

Inherited fields

Inherited from
TreeMap