forked from rolldown/rolldown
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…olldown#2381) <!-- Thank you for contributing! --> ### Description <!-- Please insert your description here and provide especially info about the "what" this PR is solving -->
- Loading branch information
Showing
7 changed files
with
66 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
use oxc::semantic::{ScopeTree, SymbolTable}; | ||
use rolldown_common::AstScopes; | ||
|
||
use crate::types::ast_symbols::AstSymbols; | ||
|
||
pub fn make_ast_scopes_and_symbols( | ||
symbols: SymbolTable, | ||
scopes: ScopeTree, | ||
) -> (AstSymbols, AstScopes) { | ||
) -> (SymbolTable, AstScopes) { | ||
let mut symbols = symbols; | ||
let ast_scope = AstScopes::new( | ||
scopes, | ||
std::mem::take(&mut symbols.references), | ||
std::mem::take(&mut symbols.resolved_references), | ||
); | ||
let ast_symbols = AstSymbols::from_symbol_table(symbols); | ||
(ast_symbols, ast_scope) | ||
(symbols, ast_scope) | ||
} |