class InterpreterLoop

The interactive shell. It provides a read-eval-print loop around the Interpreter class. After instantiation, clients should call the run method.

Constructors

InterpreterLoop ( compiler: Compiler , config: Config )
InterpreterLoop ( implicit ctx: Context )

Members

private val compiler : Compiler
private val config : Config
private implicit val ctx : Context
val gitHash : B
private var in : InteractiveReader
val interpreter : Interpreter
protected val originalClassLoader : ClassLoader

The context class loader at the time this object was created

The context class loader at the time this object was created

var replayCommandsRev : List [ String ]

A reverse list of commands to replay if the user requests a :replay

A reverse list of commands to replay if the user requests a :replay

val version : String
def addReplay ( cmd: String ) : Unit

Record a command for replay should the user request a :replay

Record a command for replay should the user request a :replay

def closeInterpreter ( ) ( implicit ctx: Context ) : Unit

Close the interpreter

Close the interpreter

def command ( line: String ) : ( Boolean, Option [ String ] )

Run one command submitted by the user. Three values are returned: (1) whether to keep running, (2) the line to record for replay, if any.

Run one command submitted by the user. Three values are returned: (1) whether to keep running, (2) the line to record for replay, if any.

private def in_= ( x$1: InteractiveReader ) : Unit
def interpretAllFrom ( filename: String ) : Unit

interpret all lines from a specified file

interpret all lines from a specified file

[+] def interpretStartingWith ( code: String ) : Option [ String ]

Interpret expressions starting with the first line. Read lines until a complete compilation unit is available or until a syntax error has been seen. If...

Interpret expressions starting with the first line. Read lines until a complete compilation unit is available or until a syntax error has been seen. If a full unit is read, go ahead and interpret it. Return the full string to be recorded for replay, if any.

def printHelp ( ) : Unit

print a friendly help message

print a friendly help message

def printWelcome ( ) : Unit

Print a welcome message

Print a welcome message

@tailrec final def repl ( line: String ) : Unit

The main read-eval-print loop for the interpreter. It calls command() for each line of input.

The main read-eval-print loop for the interpreter. It calls command() for each line of input.

def repl$default$1 : String

The main read-eval-print loop for the interpreter. It calls command() for each line of input.

The main read-eval-print loop for the interpreter. It calls command() for each line of input.

def replay ( ) : Unit

create a new interpreter and replay all commands so far

create a new interpreter and replay all commands so far

def replayCommands : List [ String ]

A list of commands to replay if the user requests a :replay

A list of commands to replay if the user requests a :replay

def replayCommandsRev_= ( x$1: List [ String ] ) : Unit

A reverse list of commands to replay if the user requests a :replay

A reverse list of commands to replay if the user requests a :replay

def run ( ) : Reporter
def silentlyBind ( values: Array [ ( String, Any ) ] ) : Unit
def silentlyRun ( cmds: List [ String ] ) : Unit