Interpreter

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

Tree interpreter for metaprogramming constructs

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Type members

Types

type Env = Map[Symbol, Object]

Value members

Concrete methods

final def interpret[T](tree: Tree)(implicit 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 ocurred.

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 ocurred.

Attributes