aboutsummaryrefslogtreecommitdiff
path: root/src/lower.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lower.c')
-rw-r--r--src/lower.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lower.c b/src/lower.c
index 21844ae..89d9aca 100644
--- a/src/lower.c
+++ b/src/lower.c
@@ -476,8 +476,8 @@ static int lower_block_vars(struct state *state, struct ast *block)
struct scope *scope = block->scope;
bool populated = false;
- foreach_visible(n, scope->symbols) {
- struct ast *def = n->node;
+ foreach(visible, n, &scope->symbols) {
+ struct ast *def = n->data;
if (def->k != AST_VAR_DEF)
continue;
@@ -626,15 +626,15 @@ int lower(struct scope *root)
{
printf("#include <fwdlib.hpp>\n");
- foreach_visible(visible, root->symbols) {
- struct ast *proc = visible->node;
+ foreach(visible, visible, &root->symbols) {
+ struct ast *proc = visible->data;
assert(proc->k == AST_PROC_DEF);
if (lower_proto(proc))
return -1;
}
- foreach_visible(visible, root->symbols) {
- struct ast *proc = visible->node;
+ foreach(visible, visible, &root->symbols) {
+ struct ast *proc = visible->data;
if (lower_proc(proc))
return -1;
}