ParsingREPL

A REPL that parses its input lines into a value (such as an abstract syntax tree), then processes them. Output is emitted to standard output.

A REPL that parses its input lines into a value (such as an abstract syntax tree), then processes them. Output is emitted to standard output.

class Object
trait Matchable
class Any

Value members

Concrete methods

def createConfig(args: Seq[String]): REPLConfig

Inherited methods

def createAndInitConfig(args: Seq[String]): Either[String, REPLConfig]

Create and initialise the configuration for a particular run of the REPL. Default: call createConfig and then initialise the resulting configuration. Returns either the created configuration or an error message describing why the configuration couldn't be created.

Create and initialise the configuration for a particular run of the REPL. Default: call createConfig and then initialise the resulting configuration. Returns either the created configuration or an error message describing why the configuration couldn't be created.

Inherited from
REPLBase
def driver(args: Seq[String]): Unit

Driver for this REPL. First, use the argument list to create a configuration for this execution. If the arguments parse ok, then print the REPL banner. Read lines from the console and pass non-null ones to processline. If ignoreWhitespaceLines is true, do not pass lines that contain just whitespace, otherwise do. Continue until processline returns false. Call prompt each time input is about to be read.

Driver for this REPL. First, use the argument list to create a configuration for this execution. If the arguments parse ok, then print the REPL banner. Read lines from the console and pass non-null ones to processline. If ignoreWhitespaceLines is true, do not pass lines that contain just whitespace, otherwise do. Continue until processline returns false. Call prompt each time input is about to be read.

Inherited from
REPLBase
def main(args: Array[String]): Unit

The entry point for this REPL.

The entry point for this REPL.

Inherited from
REPLBase
def parse(source: Source): ParseResult[T]

Parse a source, returning a parse result.

Parse a source, returning a parse result.

Inherited from
ParsingREPLBase
def process(source: Source, t: T, config: REPLConfig): Unit

Process a user input value in the given configuration.

Process a user input value in the given configuration.

Inherited from
ParsingREPLBase
@tailrec
final def processconsole(console: Console, prompt: String, config: REPLConfig): REPLConfig

Process interactively entered lines, one by one, until end of file.

Process interactively entered lines, one by one, until end of file.

Inherited from
REPLBase
def processfile(filename: String, config: REPLConfig): REPLConfig

Process a file argument by passing its contents line-by-line to processline.

Process a file argument by passing its contents line-by-line to processline.

Inherited from
REPLBase
final def processfiles(config: REPLConfig): REPLConfig

Process the files one by one, allowing config to be updated each time and updated config to be used by the next file.

Process the files one by one, allowing config to be updated each time and updated config to be used by the next file.

Inherited from
REPLBase
def processline(source: Source, console: Console, config: REPLConfig): Option[REPLConfig]

Process a user input line by parsing it to get a value of type T, then passing it to the process method. Returns the configuration unchanged.

Process a user input line by parsing it to get a value of type T, then passing it to the process method. Returns the configuration unchanged.

Inherited from
ParsingREPLBase
def processlines(config: REPLConfig): Unit

Process interactively entered lines, one by one, until end of file. Prompt with the given prompt.

Process interactively entered lines, one by one, until end of file. Prompt with the given prompt.

Inherited from
REPLBase
def prompt: String

Define the prompt (default: "> ").

Define the prompt (default: "> ").

Inherited from
REPLBase
def report(source: Source, messages: Messages, config: REPLConfig): Unit

Output the messages in order of position using the given configuration, which defaults to that configuration's output.

Output the messages in order of position using the given configuration, which defaults to that configuration's output.

Inherited from
ParsingREPLBase

Inherited fields

val messaging: Messaging

The messaging facilitiy used by this REPL.

The messaging facilitiy used by this REPL.

Inherited from
REPLBase
val positions: Positions

The position store used by this REPL.

The position store used by this REPL.

Inherited from
REPLBase