this should be handled in the compile end nat
This commit is contained in:
parent
8a0a2cf68f
commit
bc9bc44e5d
1 changed files with 11 additions and 9 deletions
12
pila.c
12
pila.c
|
@ -393,8 +393,14 @@ compile_end_nat(Pila *st)
|
|||
return;
|
||||
}
|
||||
Assert(st->cur_compw != nil);
|
||||
st->compiling = false;
|
||||
if (!Str_empty(st->cur_compw->name))
|
||||
add_word(st, st->cur_compw);
|
||||
else /* for an anonymous word */
|
||||
push_val(st, BOX_INTN((u64)st->cur_compw));
|
||||
|
||||
st->compiling = false;
|
||||
st->cur_compw = nil;
|
||||
st->cur_compw_cap = 0;
|
||||
}
|
||||
|
||||
Str
|
||||
|
@ -499,14 +505,10 @@ branch_nat(Pila *st)
|
|||
void
|
||||
add_word(Pila *st, Word *w)
|
||||
{
|
||||
if (!Str_empty(w->name)) {
|
||||
DictionaryEntry *de = malloc(sizeof(*de));
|
||||
de->word = w;
|
||||
de->next = st->dict != nil ? st->dict : nil;
|
||||
st->dict = de;
|
||||
} else {
|
||||
push_val(st, BOX_INTN((u64)w));
|
||||
}
|
||||
}
|
||||
|
||||
Word *
|
||||
|
|
Loading…
Add table
Reference in a new issue