DISABLE FDs (REMOVE ME).
[jackhill/mal.git] / nim / step1_read_print.nim
CommitLineData
b94acce6 1import rdstdin, types, reader, printer
2
3proc read(str: string): MalType = str.read_str
4
5proc eval(ast: MalType): MalType = ast
6
7proc print(exp: MalType): string = exp.pr_str
8
9while true:
10 try:
11 let line = readLineFromStdin("user> ")
12 echo line.read.eval.print
13 except:
14 echo getCurrentExceptionMsg()