summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-01-27 13:01:36 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-01-27 13:01:36 -0500
commit3467f27c4c0d44f5bb2a09d93a96c71a4c0eeccc (patch)
treeb83c7e7829069603d9c2e282eed70e50f9e006c0 /scope.c
parent730469c7a96a26ecba362db39c67e97bd07bf157 (diff)
fixed #include scoping problems
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/scope.c b/scope.c
index 0a05bae..1b116b7 100644
--- a/scope.c
+++ b/scope.c
@@ -75,6 +75,8 @@ static void block_exit(Block *b, Statement *stmts) {
if (stmt->kind == STMT_DECL) {
Declaration *decl = &stmt->decl;
remove_ident_decls(b, decl);
+ } else if (stmt->kind == STMT_INCLUDE) {
+ block_exit(b, stmt->inc.stmts);
}
}
}