ReplCompiler

class ReplCompiler extends Compiler

This subclass of Compiler is adapted for use in the REPL.

  • compiles parsed expression in the current REPL state:
    • adds the appropriate imports in scope
    • wraps expressions into a dummy object
  • provides utility to query the type of an expression
  • provides utility to query the documentation of an expression
class Compiler
class Object
trait Matchable
class Any

Value members

Concrete methods

final def compile(parsed: Parsed)(implicit state: State): Result[(CompilationUnit, State)]
def docOf(expr: String)(implicit state: State): Result[String]
override protected def frontendPhases: List[List[Phase]]

Phases dealing with the frontend up to trees ready for TASTY pickling

Phases dealing with the frontend up to trees ready for TASTY pickling

Definition Classes
def newRun(initCtx: Context, state: State): Run
final def typeCheck(expr: String, errorsAllowed: Boolean)(implicit state: State): Result[ValDef]
final def typeOf(expr: String)(implicit state: State): Result[String]

Inherited methods

def newRun(using Context): Run
Inherited from:
Compiler
Inherited from:
Compiler

Meta-ordering constraint:

Meta-ordering constraint:

DenotTransformers that change the signature of their denotation's info must go after erasure. The reason is that denotations are permanently referred to by TermRefs which contain a signature. If the signature of a symbol would change, all refs to it would become outdated - they could not be dereferenced in the new phase.

After erasure, signature changing denot-transformers are OK because signatures are never recomputed later than erasure.

Inherited from:
Compiler
def reset()(using Context): Unit
Inherited from:
Compiler

Inherited fields

var runId: Int
Inherited from:
Compiler