This commit is contained in:
Kartik K. Agaram 2021-02-28 15:28:17 -08:00
parent b89c158e3e
commit 48d439d10e
2 changed files with 3 additions and 4 deletions

View File

@ -20,6 +20,7 @@ fn parse-sexpression tokens: (addr stream cell), _out: (addr handle cell), trace
}
fn parse-atom _curr-token: (addr cell), _out: (addr handle cell), trace: (addr trace) {
trace-text trace, "read", "parse atom"
var curr-token/ecx: (addr cell) <- copy _curr-token
var curr-token-data-ah/eax: (addr handle stream byte) <- get curr-token, text-data
var _curr-token-data/eax: (addr stream byte) <- lookup *curr-token-data-ah
@ -42,7 +43,6 @@ fn parse-atom _curr-token: (addr cell), _out: (addr handle cell), trace: (addr t
{
var stream-storage: (stream byte 0x40)
var stream/ecx: (addr stream byte) <- address stream-storage
trace-higher trace
write stream, "=> number "
print-number out-addr, stream, 0/no-trace
trace trace, "read", stream
@ -60,7 +60,6 @@ fn parse-atom _curr-token: (addr cell), _out: (addr handle cell), trace: (addr t
{
var stream-storage: (stream byte 0x40)
var stream/ecx: (addr stream byte) <- address stream-storage
trace-higher trace
write stream, "=> symbol "
print-symbol out-addr, stream, 0/no-trace
trace trace, "read", stream

View File

@ -21,7 +21,7 @@ fn print-symbol _in: (addr cell), out: (addr stream byte), trace: (addr trace) {
{
compare trace, 0
break-if-=
trace-text trace, "print", "symbol"
#? trace-text trace, "print", "symbol"
}
var in/esi: (addr cell) <- copy _in
var data-ah/eax: (addr handle stream byte) <- get in, text-data
@ -42,7 +42,7 @@ fn print-number _in: (addr cell), out: (addr stream byte), trace: (addr trace) {
{
compare trace, 0
break-if-=
trace-text trace, "print", "number"
#? trace-text trace, "print", "number"
}
var in/esi: (addr cell) <- copy _in
var val/eax: (addr float) <- get in, number-data