Add register parameter to AM stack operations
This commit is contained in:
@@ -67,7 +67,7 @@ parse_state_t parse_proc(parse_ctx_t *ctx, const token_t *token)
|
||||
append(ctx, expr_symbol(ctx->am, &token->symbol));
|
||||
break;
|
||||
case TOKEN_TYPE_OPEN_PAREN:
|
||||
am_push(ctx->am);
|
||||
am_push(ctx->am, EXPR);
|
||||
push_state(ctx, PARSE_STATE_LIST);
|
||||
AM_EXPR(ctx->am) = expr_empty_list(ctx->am);
|
||||
ctx->state = PARSE_STATE_LIST;
|
||||
@@ -76,7 +76,7 @@ parse_state_t parse_proc(parse_ctx_t *ctx, const token_t *token)
|
||||
ctx->state = pop_state(ctx);
|
||||
if (ctx->state == PARSE_STATE_LIST) {
|
||||
expr_t *expr = AM_EXPR(ctx->am);
|
||||
am_pop(ctx->am);
|
||||
am_pop(ctx->am, EXPR);
|
||||
append(ctx, expr);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user