Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(analyzer): add external module declaration #242

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/parser_conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
paths:
- 'crates/biome_js_syntax/**'
- 'crates/biome_js_factory/**'
- 'crates/biome_js_semantic/**'
- 'crates/rome_js_parser/**'
- 'crates/biome_rowan/**'
- 'xtask/**'
Expand Down
5 changes: 4 additions & 1 deletion crates/biome_js_semantic/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ impl SemanticEventExtractor {
| TS_ENUM_DECLARATION
| TS_INTERFACE_DECLARATION
| TS_MODULE_DECLARATION
| TS_EXTERNAL_MODULE_DECLARATION
| TS_TYPE_ALIAS_DECLARATION => {
let parent_scope = self.scopes.get(self.scopes.len() - 2);
let parent_scope = parent_scope.map(|scope| scope.scope_id);
Expand Down Expand Up @@ -565,7 +566,8 @@ impl SemanticEventExtractor {
| TS_INTERFACE_DECLARATION
| TS_ENUM_DECLARATION
| TS_TYPE_ALIAS_DECLARATION
| TS_MODULE_DECLARATION => {
| TS_MODULE_DECLARATION
| TS_EXTERNAL_MODULE_DECLARATION => {
self.pop_scope(node.text_range());
}
_ => {}
Expand Down Expand Up @@ -884,6 +886,7 @@ impl SemanticEventExtractor {
| TS_ENUM_DECLARATION
| TS_INTERFACE_DECLARATION
| TS_MODULE_DECLARATION
| TS_EXTERNAL_MODULE_DECLARATION
));
let is_exported = matches!(
declaration.parent().kind(),
Expand Down
Loading