aboutsummaryrefslogtreecommitdiff
path: root/src/ast.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast.c')
-rw-r--r--src/ast.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ast.c b/src/ast.c
index 1a44ce1..cb4d875 100644
--- a/src/ast.c
+++ b/src/ast.c
@@ -421,13 +421,10 @@ int scope_add_child(Scope *self, Ast *child) {
}
void scope_resolve(Scope *self, AstCompilerContext *context) {
- Ast **ast;
- Ast **ast_end;
- Scope *prev_scope;
+ Ast **ast = buffer_begin(&self->ast_objects);
+ Ast **ast_end = buffer_end(&self->ast_objects);
+ Scope *prev_scope = context->scope;
- ast = buffer_begin(&self->ast_objects);
- ast_end = buffer_end(&self->ast_objects);
- prev_scope = context->scope;
context->scope = self;
for(; ast != ast_end; ++ast) {
ast_resolve(*ast, context);