about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-05-31 08:09:19 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-05-31 08:09:19 -0700
commit33311443957db23e88aca6a3469b1be9ff32b4a0 (patch)
tree00783beec3e8c3d9977439b20a502efebfc41d8d
parentd2094133aaf3728e80be327c0842712238cf1ad6 (diff)
downloadmu-33311443957db23e88aca6a3469b1be9ff32b4a0.tar.gz
data.limg now loading properly again
-rw-r--r--shell/data.limg2
-rw-r--r--shell/macroexpand.mu8
2 files changed, 8 insertions, 2 deletions
diff --git a/shell/data.limg b/shell/data.limg
index fc1f6534..5fbd6548 100644
--- a/shell/data.limg
+++ b/shell/data.limg
@@ -68,7 +68,7 @@
     (chessboard_row screen px y 0 xmax)
     (set y (+ y px))
     (chessboard_row screen px y px xmax)
-    (set y (+ y px)))))])
+    (set y (+ y px))))))))])
     (brcircle . [(def brcircle (fn (screen cx cy r clr)
   (let x (- 0 r)
   (let y 0
diff --git a/shell/macroexpand.mu b/shell/macroexpand.mu
index 7ddaea60..6ae17ccd 100644
--- a/shell/macroexpand.mu
+++ b/shell/macroexpand.mu
@@ -166,6 +166,8 @@ fn macroexpand-iter _expr-ah: (addr handle cell), globals: (addr global-table),
     compare backquote?, 0/false
     break-if-=
     #
+#?     set-cursor-position 0/screen, 0x40/x 0x10/y
+#?     dump-cell-from-cursor-over-full-screen rest-ah
     var double-unquote-found?/eax: boolean <- look-for-double-unquote rest-ah
     compare double-unquote-found?, 0/false
     {
@@ -358,8 +360,12 @@ fn look-for-double-unquote _expr-ah: (addr handle cell) -> _/eax: boolean {
       break-if-!=
       break $look-for-double-unquote:check
     }
-    # if cadr is not an unquote, break
+    # if cdr is not a pair, break
     var cdr/eax: (addr cell) <- lookup *cdr-ah
+    var cdr-type/ecx: (addr int) <- get cdr, type
+    compare *cdr-type, 0/pair
+    break-if-!=
+    # if cadr is not an unquote, break
     var cadr-ah/eax: (addr handle cell) <- get cdr, left
     var cadr/eax: (addr cell) <- lookup *cadr-ah
     {