21 lines
429 B
Plaintext
Executable File
21 lines
429 B
Plaintext
Executable File
#!/usr/bin/pl
|
||
(def repl (fn () (
|
||
(prn "pebblisp::> ")
|
||
(def input (inp))
|
||
(if (= input "q") () (
|
||
;(switch input (
|
||
; ("clear" (fn () (sys "clear")))
|
||
;))
|
||
|
||
(if (= input "") () (
|
||
(if (= input "clear") (sys "clear") (
|
||
(def ret (eval input))
|
||
(if (iserr ret) (prn "[31m[1mX => ") (prn "[1mOk =>[0m "))
|
||
(prnl ret)
|
||
(prn "[0m")))))
|
||
(repl)
|
||
))
|
||
)))
|
||
|
||
(repl)
|