DISABLE FDs (REMOVE ME).
[jackhill/mal.git] / vimscript / step0_repl.vim
1 source readline.vim
2
3 function READ(str)
4 return a:str
5 endfunction
6
7 function EVAL(ast, env)
8 return a:ast
9 endfunction
10
11 function PRINT(exp)
12 return a:exp
13 endfunction
14
15 function REP(str)
16 return PRINT(EVAL(READ(a:str), {}))
17 endfunction
18
19 while 1
20 let [eof, line] = Readline("user> ")
21 if eof
22 break
23 endif
24 if line == ""
25 continue
26 endif
27 call PrintLn(REP(line))
28 endwhile
29 qall!