File tree Expand file tree Collapse file tree 1 file changed +24
-3
lines changed
Expand file tree Collapse file tree 1 file changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -2222,6 +2222,30 @@ impl<'a> Visit<'a> for SemanticBuilder<'a> {
22222222 }
22232223 self . leave_node ( kind) ;
22242224 }
2225+
2226+ fn visit_ts_module_declaration ( & mut self , decl : & TSModuleDeclaration < ' a > ) {
2227+ let kind = AstKind :: TSModuleDeclaration ( self . alloc ( decl) ) ;
2228+ self . enter_node ( kind) ;
2229+ decl. bind ( self ) ;
2230+ self . visit_span ( & decl. span ) ;
2231+ self . visit_ts_module_declaration_name ( & decl. id ) ;
2232+ self . enter_scope (
2233+ {
2234+ let mut flags = ScopeFlags :: TsModuleBlock ;
2235+ if decl. body . as_ref ( ) . is_some_and ( TSModuleDeclarationBody :: has_use_strict_directive)
2236+ {
2237+ flags |= ScopeFlags :: StrictMode ;
2238+ }
2239+ flags
2240+ } ,
2241+ & decl. scope_id ,
2242+ ) ;
2243+ if let Some ( body) = & decl. body {
2244+ self . visit_ts_module_declaration_body ( body) ;
2245+ }
2246+ self . leave_scope ( ) ;
2247+ self . leave_node ( kind) ;
2248+ }
22252249}
22262250
22272251impl < ' a > SemanticBuilder < ' a > {
@@ -2243,9 +2267,6 @@ impl<'a> SemanticBuilder<'a> {
22432267 /* cfg */
22442268
22452269 match kind {
2246- AstKind :: TSModuleDeclaration ( module_declaration) => {
2247- module_declaration. bind ( self ) ;
2248- }
22492270 AstKind :: TSTypeAliasDeclaration ( type_alias_declaration) => {
22502271 type_alias_declaration. bind ( self ) ;
22512272 }
You can’t perform that action at this time.
0 commit comments