Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2be7882

Browse files
perf: ast scanner is_top_level (#2803)
<!-- Thank you for contributing! --> ### Description <!-- Please insert your description here and provide especially info about the "what" this PR is solving -->
1 parent 11dc867 commit 2be7882

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • crates/rolldown/src/ast_scanner

crates/rolldown/src/ast_scanner/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ impl<'me, 'ast: 'me> AstScanner<'me, 'ast> {
174174
.scope_stack
175175
.iter()
176176
.filter_map(|item| *item)
177+
.rev()
177178
.all(|scope| self.scopes.get_flags(scope).is_top())
178179
}
179180

0 commit comments

Comments
 (0)