diff options
author | kdx <kikoodx@paranoici.org> | 2023-06-18 17:50:15 +0200 |
---|---|---|
committer | kdx <kikoodx@paranoici.org> | 2023-06-18 17:50:15 +0200 |
commit | 3c0b034ee902432baed7030cc65cb2443a846600 (patch) | |
tree | 19d3d11642d1d1e363d44029a2d6d17218a3ec59 /src | |
parent | 874245962e04264ab3c8a993a109f1790ddb36e2 (diff) | |
download | golem-3c0b034ee902432baed7030cc65cb2443a846600.tar.gz |
local init accepts any expr
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1069,12 +1069,13 @@ gen_localdec(Node *node) return; const int found = node_find(locals, node->lhs); - printf("\tLIT %04x\n", const_expr(node->rhs)); + gen_expr(node->rhs); printf("\tLIT ,__stack_ptr LDA\n"); if (locals_size - found - 1) printf("\tLIT %04x SUB\n", locals_size - found - 1); printf("\tSTA\n"); + depth -= 1; } static void |