Add am_append_arg procedure

This commit is contained in:
2025-08-10 19:44:05 +01:00
parent 6077cf571d
commit 624311d04f
3 changed files with 33 additions and 0 deletions

View File

@@ -25,3 +25,14 @@ void am_pop(am_t *am)
assert(am->sp < am->stack + AM_STACK_SIZE - 1);
am->expr = *++am->sp;
}
void am_append_arg(am_t *am)
{
expr_t *list = am->argl;
while (!list->is_atom)
list = list->pair.cdr;
list->is_atom = false;
list->pair.car = am->val;
list->pair.cdr = expr_empty_list(am);
}