preserve indentation of the sandbox

This commit is contained in:
Kartik K. Agaram 2021-06-20 22:41:36 -07:00
parent 7045af7a4e
commit 9ae724e1ec
3 changed files with 7 additions and 7 deletions

View File

@ -192,5 +192,5 @@
(main . [def (main screen keyboard)
(pat screen)])
))
(sandbox . (pat screen))
(sandbox . [(pat screen)])
)

View File

@ -998,14 +998,14 @@ fn load-state _self: (addr environment), data-disk: (addr disk) {
{
compare sandbox-cell, 0
break-if-=
# print: cell -> stream
clear-trace trace
print-cell sandbox-cell-ah, s, trace
var sandbox-data-ah/eax: (addr handle stream byte) <- get sandbox-cell, text-data
var _sandbox-data/eax: (addr stream byte) <- lookup *sandbox-data-ah
var sandbox-data/ecx: (addr stream byte) <- copy _sandbox-data
# stream -> gap-buffer
var sandbox/eax: (addr sandbox) <- get self, sandbox
var data-ah/eax: (addr handle gap-buffer) <- get sandbox, data
var data/eax: (addr gap-buffer) <- lookup *data-ah
load-gap-buffer-from-stream data, s
load-gap-buffer-from-stream data, sandbox-data
}
}

View File

@ -71,9 +71,9 @@ fn write-sandbox out: (addr stream byte), _self: (addr sandbox) {
break-if-!=
return
}
write out, " (sandbox . "
write out, " (sandbox . ["
append-gap-buffer data, out
write out, ")\n"
write out, "])\n"
}
##