3 import 'printer.dart' as printer;
4 import 'reader.dart' as reader;
7 MalType READ(String x) => reader.read_str(x);
9 MalType EVAL(MalType x) => x;
11 String PRINT(MalType x) => printer.pr_str(x);
13 String rep(String x) {
14 return PRINT(EVAL(READ(x)));
17 const prompt = 'user> ';
21 var input = stdin.readLineSync();
22 if (input == null) return;
26 } on reader.ParseException catch (e) {
27 stdout.writeln("Error: '${e.message}'");
29 } on reader.NoInputException {
32 stdout.writeln(output);