From 33311443957db23e88aca6a3469b1be9ff32b4a0 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 31 May 2021 08:09:19 -0700 Subject: data.limg now loading properly again --- shell/data.limg | 2 +- shell/macroexpand.mu | 8 +++++++- 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 { -- cgit 1.4.1-2-gfad0