File tree Expand file tree Collapse file tree
should_handle_interface_with_generics
should_handle_multiline_interface Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 TypedefMember ,
2727 VariableMember ,
2828)
29- from .scope import (
30- CategoryScopeKind ,
31- InterfaceScopeKind ,
32- ProtocolScopeKind ,
33- StructLikeScopeKind ,
34- )
29+ from .scope import InterfaceScopeKind , ProtocolScopeKind , StructLikeScopeKind
3530from .snapshot import Snapshot
3631from .template import Template
3732from .utils import (
@@ -358,6 +353,17 @@ def get_property_member(
358353# Scope creation
359354######################
360355
356+ # Interfaces to skip due to Doxygen misparsing issues.
357+ # These produce malformed XML that cannot be reliably reconstructed.
358+ SKIP_INTERFACES = {
359+ # Doxygen misparses Objective-C lightweight generics like @interface Foo<T> : NSObject.
360+ # It places <T> in the base class list and corrupts subsequent declarations.
361+ "RCTGenericDelegateSplitter" ,
362+ # Multi-line interface declarations cause Doxygen to misparse inheritance.
363+ # @interface Foo\n : Bar <Protocol> results in __pad0__ and lost base classes.
364+ "RCTScrollViewComponentView" ,
365+ }
366+
361367
362368def create_enum_scope (snapshot : Snapshot , enum_def : compound .EnumdefType ) -> None :
363369 """
@@ -469,6 +475,9 @@ def create_interface_scope(
469475 """
470476 interface_name = scope_def .compoundname
471477
478+ if interface_name in SKIP_INTERFACES :
479+ return
480+
472481 interface_scope = snapshot .create_interface (interface_name )
473482 base_classes = get_base_classes (scope_def , base_class = InterfaceScopeKind .Base )
474483 interface_scope .kind .add_base (base_classes )
Original file line number Diff line number Diff line change 1+
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3+ *
4+ * This source code is licensed under the MIT license found in the
5+ * LICENSE file in the root directory of this source tree.
6+ */
7+
8+ /* *
9+ * Test case for Objective-C interface with generic type parameters.
10+ *
11+ * Doxygen 1.11.0 misparses Objective-C lightweight generics, placing
12+ * <DelegateT> in the base class list and corrupting subsequent declarations.
13+ *
14+ * This interface is SKIPPED in the parser output due to malformed Doxygen XML.
15+ * See SKIP_INTERFACES in builders.py.
16+ */
17+ @interface RCTGenericDelegateSplitter <DelegateT> : NSObject
18+
19+ @property (nonatomic , copy , nullable ) void (^delegateUpdateBlock)(DelegateT _Nullable delegate);
20+
21+ - (instancetype )initWithDelegateUpdateBlock : (void (^)(DelegateT _Nullable delegate))block ;
22+ - (void )addDelegate : (DelegateT)delegate ;
23+ - (void )removeDelegate : (DelegateT)delegate ;
24+ - (void )removeAllDelegates ;
25+
26+ @end
Original file line number Diff line number Diff line change 1+ protocol RCTMountingTransactionObserving {
2+ }
3+
4+ protocol RCTVirtualViewContainerProtocol {
5+ }
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3+ *
4+ * This source code is licensed under the MIT license found in the
5+ * LICENSE file in the root directory of this source tree.
6+ */
7+
8+ @protocol RCTMountingTransactionObserving
9+ @end
10+
11+ @protocol RCTVirtualViewContainerProtocol
12+ @end
13+
14+ @class RCTViewComponentView;
15+
16+ /* *
17+ * Test case for multi-line Objective-C interface declarations.
18+ *
19+ * Doxygen misparses interface declarations that span multiple lines,
20+ * creating __pad0__ members and losing inheritance information.
21+ *
22+ * This interface is SKIPPED in the parser output due to malformed Doxygen XML.
23+ * See SKIP_INTERFACES in builders.py.
24+ */
25+ @interface RCTScrollViewComponentView
26+ : RCTViewComponentView <RCTMountingTransactionObserving, RCTVirtualViewContainerProtocol>
27+
28+ + (nullable RCTScrollViewComponentView *)findScrollViewComponentViewForView : (UIView *)view ;
29+
30+ @end
You can’t perform that action at this time.
0 commit comments