1
1
mirror of https://github.com/kanaka/mal.git synced 2024-11-10 12:47:45 +03:00
mal/coffee/step0_repl.coffee
2015-01-09 16:16:45 -06:00

21 lines
315 B
CoffeeScript

readline = require "./node_readline.coffee"
# read
READ = (str) -> str
# eval
EVAL = (ast, env) -> ast
# print
PRINT = (exp) -> exp
# repl
rep = (str) -> PRINT(EVAL(READ(str), {}))
# repl loop
while (line = readline.readline("user> ")) != null
continue if line == ""
console.log rep line
# vim: ts=2:sw=2