diff options
| author | mryouse | 2022-07-10 21:13:41 +0000 |
|---|---|---|
| committer | mryouse | 2022-07-10 21:13:41 +0000 |
| commit | 9226c0221e603668346676fffa8dc49e934882d3 (patch) | |
| tree | b9bbfc3687e49e33a75f0e9ce9a8561892e6edab | |
| parent | 5194669bd08d7cabefe1e22e72de75df5443af38 (diff) | |
strings should be printed with surrounding quotes
| -rw-r--r-- | repl.neb | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -33,6 +33,12 @@ (redef tmp (strip (read-line (prompt next-cmd-num))))) tmp) + (func print-result (res) + (print (concat "=> " + (if (eq? :string (typeof res)) + (concat "\"" res "\"") + (->string res))))) + ; this is the actual loop part (while #true (def this-cmd (get-non-empty-input)) @@ -43,10 +49,11 @@ (block (redef panicked #true) _panic_))) + (if panicked (print (concat "panic! " evaluated)) (block - (print (concat "=> " (->string evaluated))) + (print-result evaluated) (redef next-cmd-num (+ 1 next-cmd-num)) (redef _history_ (append _history_ this-cmd)))))) |
