ExpressionCompiler
dotty.tools.debug.ExpressionCompiler
class ExpressionCompiler(config: ExpressionCompilerConfig) extends Compiler
The expression compiler powers the debug console in Metals and the IJ Scala plugin, enabling evaluation of arbitrary Scala expressions at runtime (even macros). It produces class files that can be loaded by the running Scala program, to compute the evaluation output.
To do so, it extends the Compiler with 3 phases:
- InsertExpression: parses and inserts the expression in the original source tree
- ExtractExpression: extract the typed expression and places it in the new expression class
- ResolveReflectEval: resolves local variables or inacessible members using reflection calls
Attributes
- Graph
-
- Supertypes
Members list
In this article