From 26e9387df6a2653dd2c71d646731a427456a0f7d Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 22 Jun 2021 21:20:45 -0700 Subject: snapshot: infix Like parenthesize, I'm copying tests over from https://github.com/akkartik/wart Unlike parenthesize, though, I can't just transliterate the code itself. Wart was operating on an intermediate AST representation. Here I'm all the way down to cells. That seemed like a good idea when I embarked, but now I'm not so sure. Operating with the right AST data structure allowed me to more easily iterate over the elements of a list. The natural recursion for cells is not a good fit. This patch and the next couple is an interesting case study in what makes Unix so effective. Yes, you have to play computer, and yes it gets verbose and ugly. But just diff and patch go surprisingly far in helping build a picture of the state space in my brain. Then again, there's a steep gradient of skills here. There are people who can visualize state spaces using diff and patch far better than me, and people who can't do it as well as me. Nature, nurture, having different priorities, whatever the reason. Giving some people just the right crutch excludes others. --- shell/macroexpand.mu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'shell/macroexpand.mu') diff --git a/shell/macroexpand.mu b/shell/macroexpand.mu index 0f3837c7..74f0e9c5 100644 --- a/shell/macroexpand.mu +++ b/shell/macroexpand.mu @@ -600,7 +600,7 @@ fn pending-test-macroexpand-inside-nested-backquote-unquote { var dummy/eax: boolean <- macroexpand-iter result-ah, globals, trace var error?/eax: boolean <- has-errors? trace check-not error?, "F - test-macroexpand-inside-nested-backquote-unquote/error" - dump-cell-from-cursor-over-full-screen result-ah +#? dump-cell-from-cursor-over-full-screen result-ah var _result/eax: (addr cell) <- lookup *result-ah var result/edi: (addr cell) <- copy _result # expected @@ -610,7 +610,7 @@ fn pending-test-macroexpand-inside-nested-backquote-unquote { var expected-h: (handle cell) var expected-ah/edx: (addr handle cell) <- address expected-h read-cell expected-gap, expected-ah, trace - dump-cell-from-cursor-over-full-screen expected-ah +#? dump-cell-from-cursor-over-full-screen expected-ah var expected/eax: (addr cell) <- lookup *expected-ah # var assertion/eax: boolean <- cell-isomorphic? result, expected, trace -- cgit 1.4.1-2-gfad0