6852 - tile: placeholder for lexical scopes
This commit is contained in:
parent
b27a1a2523
commit
a04f816cff
|
@ -40,6 +40,16 @@ type value {
|
|||
box-data: (handle line)
|
||||
}
|
||||
|
||||
type bind {
|
||||
key: (handle array byte)
|
||||
value: value
|
||||
}
|
||||
|
||||
type table {
|
||||
data: (handle array bind)
|
||||
next: (handle table)
|
||||
}
|
||||
|
||||
#? type result {
|
||||
#? data: (handle value-stack)
|
||||
#? error: (handle array byte) # single error message for now
|
||||
|
|
|
@ -238,7 +238,7 @@ fn render-column screen: (addr screen), defs: (addr function), scratch: (addr li
|
|||
var stack: int-stack
|
||||
var stack-addr/edi: (addr int-stack) <- address stack
|
||||
initialize-int-stack stack-addr, 0x10 # max-words
|
||||
evaluate defs, scratch, final-word, stack-addr
|
||||
evaluate defs, 0, scratch, final-word, stack-addr
|
||||
# render stack
|
||||
var curr-row/edx: int <- copy top-row
|
||||
curr-row <- add 3 # stack-margin-top
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
fn evaluate defs: (addr function), scratch: (addr line), end: (addr word), out: (addr int-stack) {
|
||||
fn evaluate defs: (addr function), bindings: (addr table), scratch: (addr line), end: (addr word), out: (addr int-stack) {
|
||||
var line/eax: (addr line) <- copy scratch
|
||||
var word-ah/eax: (addr handle word) <- get line, data
|
||||
var curr/eax: (addr word) <- lookup *word-ah
|
||||
|
|
Loading…
Reference in New Issue