System.out.println();
System.out.println("Type 'quit()' and press <Enter> to exit.");
try {
while (true) {
ReplResult result = mRepl.readAndEvaluate(createReader(mRepl));
if (result.getText() != null) {
// Indent the lines.
String text = result.getText().replace("\n", "\n ");
if (result.isError()) {
printError(text);
} else {
printResult(text);
}
}