aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormryouse2022-07-29 19:08:15 +0000
committermryouse2022-07-29 19:08:15 +0000
commit82f5622dd6babf8d3984b694a3267aa3eae92d12 (patch)
tree1d0f1654eb487439498b321bd3e7ec0d42fe8435
parentaadc673afcd6442a44465d96b55c412f3dd09cd1 (diff)
WIP repl still doesn't really work
-rw-r--r--repl.neb10
1 files changed, 8 insertions, 2 deletions
diff --git a/repl.neb b/repl.neb
index 4ec2401..41dacb6 100644
--- a/repl.neb
+++ b/repl.neb
@@ -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))))))