File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
compiler/src/dotty/tools/debug Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,17 @@ import dotty.tools.dotc.core.Contexts.Context
55import dotty .tools .dotc .core .Phases .Phase
66import dotty .tools .dotc .transform .ElimByName
77
8+ /**
9+ * The expression compiler powers the debug console in Metals and the IJ Scala plugin,
10+ * enabling evaluation of arbitrary Scala expressions at runtime (even macros).
11+ * It produces class files that can be loaded by the running Scala program,
12+ * to compute the evaluation output.
13+ *
14+ * To do so, it extends the Compiler with 3 phases:
15+ * - InsertExpression: parses and inserts the expression in the original source tree
16+ * - ExtractExpression: extract the typed expression and places it in the new expression class
17+ * - ResolveReflectEval: resolves local variables or inacessible members using reflection calls
18+ */
819class ExpressionCompiler (config : ExpressionCompilerConfig ) extends Compiler :
920
1021 override protected def frontendPhases : List [List [Phase ]] =
You can’t perform that action at this time.
0 commit comments