TreeReader

class TreeReader(val reader: TastyReader)
class Object
trait Matchable
class Any

Value members

Concrete methods

def coordAt(addr: Addr)(using Context): Coord

Coordinate for the symbol at addr.

Coordinate for the symbol at addr.

Create symbol of member definition or parameter node and enter in symAtAddr map

Create symbol of member definition or parameter node and enter in symAtAddr map

Returns:

the created symbol

Create symbol of definition node and enter in symAtAddr map

Create symbol of definition node and enter in symAtAddr map

Returns:

the created symbol

def forkAt(start: Addr): TreeReader
def indexParams(tag: Int)(using Context): Unit

Create symbols the longest consecutive sequence of parameters with given tag starting at current address.

Create symbols the longest consecutive sequence of parameters with given tag starting at current address.

def indexStats(end: Addr)(using Context): FlagSet

Create symbols for the definitions in the statement sequence between current address and end.

Create symbols for the definitions in the statement sequence between current address and end.

Returns:

the largest subset of {NoInits, PureInterface} that a trait owning the indexed statements can have as flags.

Create symbols for all type and value parameters of template starting at current address.

Create symbols for all type and value parameters of template starting at current address.

def isAbstractType(name: Name)(using Context): Boolean

The next tag, following through SHARED tags

The next tag, following through SHARED tags

def processPackage[T](op: (RefTree, Addr) => Context ?=> T)(using Context): T

Process package with given operation op. The operation takes as arguments

Process package with given operation op. The operation takes as arguments

  • a RefTree representing the pid of the package,
  • an end address,
  • a context which has the processed package as owner
def readCase()(using Context): CaseDef
def readCases(end: Addr)(using Context): List[CaseDef]
def readConstant(tag: Int)(using Context): Constant
inline def readImportOrExport(inline mkTree: (Tree, List[ImportSelector]) => Tree)()(using Context): Tree

If definition was already read by a completer, return the previously read tree or else read definition.

If definition was already read by a completer, return the previously read tree or else read definition.

def readIndexedParams[T <: MemberDef](tag: Int)(using Context): List[T]
def readIndexedStat(exprOwner: Symbol)(using Context): Tree
def readIndexedStats[T](exprOwner: Symbol, end: Addr, k: (List[Tree], Context) => T)(using Context): T
def readLater[T <: AnyRef](end: Addr, op: TreeReader => Context ?=> T)(using Context): Lazy[T]
def readLaterWithOwner[T <: AnyRef](end: Addr, op: TreeReader => Context ?=> T)(using Context): Symbol => Lazy[T]
def readModifiers(end: Addr)(using Context): (FlagSet, List[Symbol => Annotation], Symbol)

Read modifier list into triplet of flags, annotations and a privateWithin boundary symbol.

Read modifier list into triplet of flags, annotations and a privateWithin boundary symbol.

Read names in an interleaved sequence of types/bounds and (parameter) names, possibly followed by a sequence of modifiers.

Read names in an interleaved sequence of types/bounds and (parameter) names, possibly followed by a sequence of modifiers.

def readParamTypes[T <: Type](n: Int)(using Context): List[T]

Read n parameter types or bounds which are interleaved with names

Read n parameter types or bounds which are interleaved with names

def readParams[T <: MemberDef](tag: Int)(using Context): List[T]
def readStats[T](exprOwner: Symbol, end: Addr, k: (List[Tree], Context) => T)(using Context): T
def readSymRef()(using Context): Symbol

Read reference to definition and return symbol created at that definition

Read reference to definition and return symbol created at that definition

def readTerm()(using Context): Tree
def readTopLevel()(using Context): List[Tree]
def readTpt()(using Context): Tree
def readType()(using Context): Type

Read a type

Read a type

Record all directly nested definitions and templates in current tree as OwnerTrees in buf. A complication concerns member definitions. These are lexically nested in a Template node, but need to be listed separately in the OwnerTree of the enclosing class in order not to confuse owner chains.

Record all directly nested definitions and templates in current tree as OwnerTrees in buf. A complication concerns member definitions. These are lexically nested in a Template node, but need to be listed separately in the OwnerTree of the enclosing class in order not to confuse owner chains.

def scanTrees(buf: ListBuffer[OwnerTree], end: Addr, mode: MemberDefMode): Unit

Record all directly nested definitions and templates between current address and end as OwnerTrees in buf

Record all directly nested definitions and templates between current address and end as OwnerTrees in buf

def setSpan[T <: Tree](addr: Addr, tree: T)(using Context): tree.type

Set position of tree at given addr.

Set position of tree at given addr.

def skipToplevel()(using Context): Unit
def skipTree(tag: Int): Unit
def skipTree(): Unit
def sourceChangeContext(addr: Addr)(using Context): Context

If currentAddr carries a source path, the current context with the source of that path, otherwise the current context itself.

If currentAddr carries a source path, the current context with the source of that path, otherwise the current context itself.

def sourcePathAt(addr: Addr)(using Context): String

Pickled source path at addr.

Pickled source path at addr.

def spanAt(addr: Addr)(using Context): Span

Pickled span for addr.

Pickled span for addr.

def symbolAt(addr: Addr)(using Context): Symbol

The symbol at given address; createa new one if none exists yet

The symbol at given address; createa new one if none exists yet

The symbol defined by current definition

The symbol defined by current definition

Concrete fields

val reader: TastyReader