@@ -11,9 +11,9 @@ use oxc_cfg::{ControlFlowGraphBuilder, ErrorEdgeKind};
1111use oxc_span:: { Ident , SourceType } ;
1212use oxc_syntax:: { reference:: ReferenceFlags , scope:: ScopeFlags } ;
1313
14- #[ cfg( feature = "linter" ) ]
15- use crate :: jsdoc:: JSDocBuilder ;
1614use crate :: { Semantic , SemanticBuilder , SemanticBuilderReturn , stats:: Stats } ;
15+ #[ cfg( feature = "jsdoc" ) ]
16+ use oxc_jsdoc:: JSDocBuilder ;
1717
1818#[ cfg( feature = "cfg" ) ]
1919macro_rules! control_flow {
@@ -80,7 +80,7 @@ impl<'a> SemanticBuilderAstroExt<'a> for SemanticBuilder<'a> {
8080 // Astro files are TypeScript + JSX
8181 self . source_type = SourceType :: ts ( ) . with_jsx ( true ) ;
8282
83- #[ cfg( feature = "linter " ) ]
83+ #[ cfg( feature = "jsdoc " ) ]
8484 {
8585 self . jsdoc = JSDocBuilder :: new ( self . source_text , comments) ;
8686 }
@@ -108,8 +108,11 @@ impl<'a> SemanticBuilderAstroExt<'a> for SemanticBuilder<'a> {
108108 self . scoping
109109 . set_root_unresolved_references ( self . unresolved_references . into_root ( ) . into_iter ( ) ) ;
110110
111- #[ cfg( feature = "linter" ) ]
112- let jsdoc = self . jsdoc . build ( ) ;
111+ #[ cfg( feature = "jsdoc" ) ]
112+ let jsdoc = {
113+ let result = self . jsdoc . build ( ) ;
114+ crate :: jsdoc:: JSDocFinder :: new ( result. attached , result. not_attached )
115+ } ;
113116
114117 #[ cfg( debug_assertions) ]
115118 self . unused_labels . assert_empty ( ) ;
@@ -122,7 +125,7 @@ impl<'a> SemanticBuilderAstroExt<'a> for SemanticBuilder<'a> {
122125 nodes : self . nodes ,
123126 scoping : self . scoping ,
124127 classes : self . class_table_builder . build ( ) ,
125- #[ cfg( feature = "linter " ) ]
128+ #[ cfg( feature = "jsdoc " ) ]
126129 jsdoc,
127130 unused_labels : self . unused_labels . labels ,
128131 #[ cfg( feature = "cfg" ) ]
0 commit comments