about summary refs log tree commit diff stats
path: root/shell/sandbox.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-03-04 21:24:48 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-03-04 22:05:39 -0800
commite5ff0c39a6762ea60f8deef2f21efda8b5115e3b (patch)
treebf24c6b30106ebb453ae4679e115f4c23cb11314 /shell/sandbox.mu
parent57c3617ef6570b1499270f9b2b498b5bbb3220ea (diff)
downloadmu-e5ff0c39a6762ea60f8deef2f21efda8b5115e3b.tar.gz
7849 - shell: literal numbers
Diffstat (limited to 'shell/sandbox.mu')
-rw-r--r--shell/sandbox.mu12
1 files changed, 10 insertions, 2 deletions
diff --git a/shell/sandbox.mu b/shell/sandbox.mu
index 49c2a5f9..6f25474a 100644
--- a/shell/sandbox.mu
+++ b/shell/sandbox.mu
@@ -174,9 +174,17 @@ fn run in: (addr gap-buffer), out: (addr stream byte), trace: (addr trace) {
     break-if-=
     return
   }
-  # TODO: eval
+  var eval-result-storage: (handle cell)
+  var eval-result/edi: (addr handle cell) <- address eval-result-storage
+  evaluate read-result, eval-result, trace
+  var error?/eax: boolean <- has-errors? trace
+  {
+    compare error?, 0/false
+    break-if-=
+    return
+  }
   clear-stream out
-  print-cell read-result, out, trace
+  print-cell eval-result, out, trace
   mark-lines-dirty trace
 }