1 readline = require "./node_readline.coffee"
2 reader = require "./reader.coffee"
3 printer = require "./printer.coffee"
6 READ = (str) -> reader.read_str str
9 EVAL = (ast, env) -> ast
12 PRINT = (exp) -> printer._pr_str exp, true
15 rep = (str) -> PRINT(EVAL(READ(str), {}))
18 while (line = readline.readline("user> ")) != null
19 continue if line == ""
23 continue if exc instanceof reader.BlankException
24 if exc.stack? and exc.stack.length > 2000
25 console.log exc.stack.slice(0,1000) + "\n ..." + exc.stack.slice(-1000)
26 else if exc.stack? then console.log exc.stack