aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scope.c
diff options
context:
space:
mode:
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/scope.c b/scope.c
index cbf2fcf5..420c0f5a 100644
--- a/scope.c
+++ b/scope.c
@@ -40,6 +40,11 @@ struct scope *block_scope = &builtin_scope, // regular automatic variables etc
*file_scope = &builtin_scope, // static
*global_scope = &builtin_scope; // externally visible
+void set_current_scope(struct symbol *sym)
+{
+ sym->scope = block_scope;
+}
+
void bind_scope(struct symbol *sym, struct scope *scope)
{
sym->scope = scope;