trait TypedTreeInfo

Members

final object closure

An extractor for closures, either contained in a block or standalone.

def closureBody ( tree: Tree ) ( implicit ctx: Context ) : Tree

If tree is a closure, its body, otherwise tree itself

def constToLiteral ( tree: Tree ) ( implicit ctx: Context ) : Tree

If tree is a constant expression, its value as a Literal, or tree itself otherwise.

Note: Demanding idempotency instead of purity in literalize is stric...

  Ident
  Select
  TypeApply
def decomposeCall ( tree: Tree ) :

Decompose a call fntargs...(vargs_n) into its constituents (where targs, vargss may be empty)

def defPath ( sym: Symbol , root: Tree ) ( implicit ctx: Context ) : List

Going from child to parent, the path of tree nodes that starts with a definition of symbol sym and ends with root, or Nil if no such path exists. Pre: sy...

def definedSym ( tree: Tree ) ( implicit ctx: Context ) : Symbol

If tree is a DefTree, the symbol defined by it, otherwise NoSymbol

def definingStats ( sym: Symbol ) ( implicit ctx: Context ) : List

The statement sequence that contains a definition of sym, or Nil if none was found. For a tree to be found, The symbol must have a position and its defi...

private def exprPurity ( tree: Tree ) ( implicit ctx: Context ) : PurityLevel

The purity level of this expression.

def isCatchCase ( cdef: CaseDef ) ( implicit ctx: Context ) : Boolean

Is this pattern node a catch-all or type-test pattern?

def isIdempotentExpr ( tree: Tree ) ( implicit ctx: Context ) : Boolean
def isIdempotentRef ( tree: Tree ) ( implicit ctx: Context ) : Boolean
def isPureExpr ( tree: Tree ) ( implicit ctx: Context ) : Boolean
def isPureRef ( tree: Tree ) ( implicit ctx: Context ) : Boolean
def isSelf ( tree: Tree , enclClass: Symbol ) ( implicit ctx: Context ) : Boolean

Is tree a this node which belongs to enclClass?

private def isSimpleThrowable ( tp: Type ) ( implicit ctx: Context ) : Boolean
def isStructuralTermSelect ( tree: Tree ) ( implicit ctx: Context ) : Boolean

Is this a selection of a member of a structural type that is not a member of an underlying class or trait?

def isVariableOrGetter ( tree: Tree ) ( implicit ctx: Context ) : Boolean

Is tree a reference to a mutable variable, or to a potential getter that has a setter in the same class?

def localSyms ( stats: List [ Tree ] ) ( implicit ctx: Context ) : List

The symbols defined locally in a statement list

def mayBeVarGetter ( sym: Symbol ) ( implicit ctx: Context ) : Boolean

Is symbol potentially a getter of a mutable variable?

private def minOf ( l0: PurityLevel , ls: List [ PurityLevel ] ) : PurityLevel
def patVars ( tree: Tree ) ( implicit ctx: Context ) : List

The variables defined by a pattern, in reverse order of their appearance.

private def refPurity ( tree: Tree ) ( implicit ctx: Context ) : PurityLevel
def sliceTopLevel ( tree: Tree , cls: ClassSymbol ) ( implicit ctx: Context ) : List

The tree containing only the top-level classes and objects matching either cls or its companion object

private def statPurity ( tree: Tree ) ( implicit ctx: Context ) : PurityLevel

The purity level of this statement.

def stripCast ( tree: Tree ) ( implicit ctx: Context ) : Tree

Strips layers of .asInstanceOf[T] / _.$asInstanceOf[T]() from an expression

def topLevelClasses ( tree: Tree ) ( implicit ctx: Context ) : List

The top level classes in this tree, including only those module classes that are not a linked class of some other class in the result.