diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-06 19:14:21 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-06 19:14:21 -0400 |
| commit | bc93dea8186168aa015b05a615bc1873173393b5 (patch) | |
| tree | 9e855f972a09db642f15d92401cd36353d4beafd /src/ast.c | |
| parent | dd758d0a05979a3c4a4c2eee3a2a26622f0e7b45 (diff) | |
Remove dead code for handling Declare statments with Use inside
Diffstat (limited to 'src/ast.c')
| -rw-r--r-- | src/ast.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -324,7 +324,7 @@ void visit_topologically(ast_list_t *asts, Closure_t fn) Table_t visited = {}; // First: 'use' statements in order: for (ast_list_t *stmt = asts; stmt; stmt = stmt->next) { - if (stmt->ast->tag == Use || (stmt->ast->tag == Declare && Match(stmt->ast, Declare)->value->tag == Use)) + if (stmt->ast->tag == Use) visit(fn.userdata, stmt->ast); } // Then typedefs in topological order: @@ -335,7 +335,7 @@ void visit_topologically(ast_list_t *asts, Closure_t fn) // Then everything else in order: for (ast_list_t *stmt = asts; stmt; stmt = stmt->next) { if (!(stmt->ast->tag == StructDef || stmt->ast->tag == EnumDef || stmt->ast->tag == LangDef - || stmt->ast->tag == Use || (stmt->ast->tag == Declare && Match(stmt->ast, Declare)->value->tag == Use))) { + || stmt->ast->tag == Use)) { visit(fn.userdata, stmt->ast); } } |
