diff options
| author | mryouse | 2022-07-29 19:08:15 +0000 |
|---|---|---|
| committer | mryouse | 2022-07-29 19:08:15 +0000 |
| commit | 82f5622dd6babf8d3984b694a3267aa3eae92d12 (patch) | |
| tree | 1d0f1654eb487439498b321bd3e7ec0d42fe8435 | |
| parent | aadc673afcd6442a44465d96b55c412f3dd09cd1 (diff) | |
WIP repl still doesn't really work
| -rw-r--r-- | repl.neb | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -34,6 +34,7 @@ tmp) (func print-result (res) + ;(def calc res) (print (concat "=> " (if (eq? :string (typeof res)) (raw res) @@ -45,15 +46,20 @@ (def panicked #false) ; we may not need this two-step if there's a :panic type (def evaluated (try - (eval (parse-neb this-cmd)) + ;(eval (first (parse-neb this-cmd))) + (quote (first (parse-neb this-cmd))) + ;(quote (map eval (parse-neb this-cmd))) + ;(parse-neb this-cmd) (block (redef panicked #true) _panic_))) + ;(print evaluated) + (if panicked (print (concat "panic! " evaluated)) (block - (print-result evaluated) + (print-result 'evaluated) (redef next-cmd-num (+ 1 next-cmd-num)) (redef _history_ (append _history_ this-cmd)))))) |
