dotty.tools.debug
package dotty.tools.debug
Members list
Type members
Classlikes
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.
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
- Supertypes
class ExpressionCompilerBridge
Attributes
- Supertypes
class ExpressionCompilerConfig
Attributes
- Supertypes
object ReflectEvalStrategy extends StickyKey[ReflectEvalStrategy]
In this article