diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-06-22 23:39:54 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-06-22 23:39:54 -0700 |
commit | 76ef912eb25cf6eccac43253ad1184d6fd502426 (patch) | |
tree | 435e519b05aa08d34ac74caa73cf12b297699609 /shell | |
parent | 2eae06ebda6edfb5d0ea3f8823ccaf60af38694e (diff) | |
download | mu-76ef912eb25cf6eccac43253ad1184d6fd502426.tar.gz |
all tests passing again; infix seems done
Diffstat (limited to 'shell')
-rw-r--r-- | shell/infix.mu | 6 | ||||
-rw-r--r-- | shell/macroexpand.mu | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/shell/infix.mu b/shell/infix.mu index c9115f39..2239ab77 100644 --- a/shell/infix.mu +++ b/shell/infix.mu @@ -169,6 +169,11 @@ fn transform-infix-2 _x-ah: (addr handle cell), trace: (addr trace), at-head-of- # scan past first three elements var first-ah/ecx: (addr handle cell) <- get x, left var rest-ah/esi: (addr handle cell) <- get x, right + { + var quote-or-unquote?/eax: boolean <- quote-or-unquote? first-ah + compare quote-or-unquote?, 0/false + } + break-if-!= var rest/eax: (addr cell) <- lookup *rest-ah { var continue?/eax: boolean <- not-null-not-nil-pair? rest @@ -392,6 +397,7 @@ fn test-infix { check-infix "~a+b", "(+ (~ a) b)", "F - test-infix/unary-complement" check-infix "(n * n-1)", "(* n (- n 1))", "F - test-infix/no-spaces-over-spaces" check-infix "`(a + b)", "`(+ a b)", "F - test-infix/backquote" + check-infix "`(+ a b)", "`(+ a b)", "F - test-infix/backquote-2" check-infix ",@a+b", ",@(+ a b)", "F - test-infix/unquote-splice" check-infix ",@(a + b)", ",@(+ a b)", "F - test-infix/unquote-splice-2" } diff --git a/shell/macroexpand.mu b/shell/macroexpand.mu index 74f0e9c5..f65ead85 100644 --- a/shell/macroexpand.mu +++ b/shell/macroexpand.mu @@ -416,7 +416,7 @@ fn test-macroexpand { var dummy/eax: boolean <- macroexpand-iter result-ah, globals, trace var error?/eax: boolean <- has-errors? trace check-not error?, "F - test-macroexpand/error" -#? dump-cell-from-cursor-over-full-screen result-ah +#? dump-cell-from-cursor-over-full-screen result-ah, 4/fg 0/bg var _result/eax: (addr cell) <- lookup *result-ah var result/edi: (addr cell) <- copy _result # expected |