mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Include packages/react-native/Libraries path in ReactApple snapshot (#56060)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/56060 There are Objective-C files located in the `packages/react-native/Libraries` paths. This diff modifies the config to tell doxygen to parse them and fixes problem with parsing interfaces and protocols that share the same name. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D96141632 fbshipit-source-id: 76c5873574108eb0f610637ce2bd2eeb54b8537c
This commit is contained in:
1 parent
150377caf0
commit
c625015c6f
2 files changed
+10
-3
No files matched your search
@@ -54,6 +54,7 @@ ReactApple:
|
||||
- packages/react-native/ReactCommon
|
||||
- packages/react-native/React
|
||||
- packages/react-native/ReactApple
|
||||
- packages/react-native/Libraries
|
||||
exclude_patterns:
|
||||
- "*/test_utils/*"
|
||||
- "*/jni/*"
|
||||
@@ -63,6 +64,8 @@ ReactApple:
|
||||
- "*/platform/android/*"
|
||||
- "*+Private.h"
|
||||
- "*+Internal.h"
|
||||
- "*/scripts/*"
|
||||
- "*/templates/*"
|
||||
definitions:
|
||||
__cplusplus: 1
|
||||
variants:
|
||||
|
||||
@@ -90,14 +90,18 @@ class Snapshot:
|
||||
def create_protocol(self, qualified_name: str) -> Scope[ProtocolScopeKind]:
|
||||
"""
|
||||
Create a protocol in the snapshot.
|
||||
In Objective-C, a protocol and interface can share the same name,
|
||||
so protocols are stored with a '-p' suffix to differentiate them.
|
||||
"""
|
||||
path = parse_qualified_path(qualified_name)
|
||||
scope_path = path[0:-1]
|
||||
scope_name = path[-1]
|
||||
# Use '-p' suffix to allow protocols to coexist with interfaces of the same name
|
||||
scope_key = f"{scope_name}-p"
|
||||
current_scope = self.ensure_scope(scope_path)
|
||||
|
||||
if scope_name in current_scope.inner_scopes:
|
||||
scope = current_scope.inner_scopes[scope_name]
|
||||
if scope_key in current_scope.inner_scopes:
|
||||
scope = current_scope.inner_scopes[scope_key]
|
||||
if scope.kind.name == "temporary":
|
||||
scope.kind = ProtocolScopeKind()
|
||||
else:
|
||||
@@ -108,7 +112,7 @@ class Snapshot:
|
||||
else:
|
||||
new_scope = Scope(ProtocolScopeKind(), scope_name)
|
||||
new_scope.parent_scope = current_scope
|
||||
current_scope.inner_scopes[scope_name] = new_scope
|
||||
current_scope.inner_scopes[scope_key] = new_scope
|
||||
return new_scope
|
||||
|
||||
def create_interface(self, qualified_name: str) -> Scope[InterfaceScopeKind]:
|
||||
|
||||
Reference in new issue
Block a user