all tests passing again; infix seems done
This commit is contained in:
parent
2eae06ebda
commit
76ef912eb2
28
mu-init.subx
28
mu-init.subx
|
@ -14,21 +14,19 @@ Entry:
|
|||
bd/copy-to-ebp 0/imm32
|
||||
#
|
||||
#? (main 0 0 Primary-bus-secondary-drive)
|
||||
(set-cursor-position 0 0x30 2)
|
||||
(test-infix)
|
||||
#? # always first run tests
|
||||
#? (run-tests)
|
||||
#? (num-test-failures) # => eax
|
||||
#? # call main if tests all passed
|
||||
#? {
|
||||
#? 3d/compare-eax-and 0/imm32
|
||||
#? 75/jump-if-!= break/disp8
|
||||
#? c7 0/subop/copy *Running-tests? 0/imm32/false
|
||||
#? (clear-real-screen)
|
||||
#? c7 0/subop/copy *Real-screen-cursor-x 0/imm32
|
||||
#? c7 0/subop/copy *Real-screen-cursor-y 0/imm32
|
||||
#? (main 0 0 Primary-bus-secondary-drive)
|
||||
#? }
|
||||
# always first run tests
|
||||
(run-tests)
|
||||
(num-test-failures) # => eax
|
||||
# call main if tests all passed
|
||||
{
|
||||
3d/compare-eax-and 0/imm32
|
||||
75/jump-if-!= break/disp8
|
||||
c7 0/subop/copy *Running-tests? 0/imm32/false
|
||||
(clear-real-screen)
|
||||
c7 0/subop/copy *Real-screen-cursor-x 0/imm32
|
||||
c7 0/subop/copy *Real-screen-cursor-y 0/imm32
|
||||
(main 0 0 Primary-bus-secondary-drive)
|
||||
}
|
||||
|
||||
# hang indefinitely
|
||||
{
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue