Interpreter

dotty.tools.dotc.quoted.Interpreter
See theInterpreter companion object
class Interpreter(pos: SrcPos, classLoader0: ClassLoader)(using x$3: Context)

Tree interpreter for metaprogramming constructs

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Types

type Env = Map[Symbol, Object]

Local variable environment

Local variable environment

Attributes

Value members

Concrete methods

def emptyEnv: Env
inline def env(using e: Env): e.type
final def interpret[T](tree: Tree)(using ct: ClassTag[T]): Option[T]

Returns the result of interpreting the code in the tree. Return Some of the result or None if the result type is not consistent with the expected type. Throws a StopInterpretation if the tree could not be interpreted or a runtime exception occurred.

Returns the result of interpreting the code in the tree. Return Some of the result or None if the result type is not consistent with the expected type. Throws a StopInterpretation if the tree could not be interpreted or a runtime exception occurred.

Attributes

Concrete fields