app

This module contains the main function for the REPL. It also runs script files.

Members

Functions

evaluateWithErrorChecking
void evaluateWithErrorChecking(Terminal* term, Interpreter interpreter, string source, string fileName)

This runs a script program and prints the appropriate error message when a script exception is caught. A lot of extra code is added to capture the result of the previous expression, but all one really needs is a call to evaluate or evaluateFile and runVMFibers call surrounded by a try-catch.

main
int main(string[] args)

Main function for the REPL or interpreter. If no command line arguments are specified, it enters interactive REPL mode, otherwise it attempts to execute the first argument as a script file.

Meta