17 Commits
Author SHA1 Message Date
Jakub Piasecki f90612171b Handle constexpr functions (#55801)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55801

Changelog: [Internal]

Handle `constexpr` functions in the C++ API snapshot

Reviewed By: javache

Differential Revision: D94658128

fbshipit-source-id: 9e380de951e46dff72ba40c8726e46c01340a9a8
2026-02-27 06:45:35 -08:00
Jakub Piasecki 481134aafe Unify doxygen text parsing (#55696)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55696

Changelog: [Internal]

Unifies different methods of parsing doxygen text outputs into a single method, able to resolve nested references.

Reviewed By: cipolleschi

Differential Revision: D94077808

fbshipit-source-id: 494ee4da7380e17a60bbdae8e552f1c3827c1130
2026-02-25 11:16:36 -08:00
Jakub Piasecki 6ea92367e7 Handle brace initializers (#55650)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55650

Changelog: [Internal]

Updates the C++ snapshot generation script to correctly handle brace-initialized values. It also adds `STORE_INITIALIZERS_IN_SNAPSHOT` which can be used to enable/disable presence of initializers in the API snapshot.

Reviewed By: cortinico

Differential Revision: D93845131

fbshipit-source-id: 06872e705305ced0c46779f4a97c674f26417ff5
2026-02-25 11:16:36 -08:00
Jakub Piasecki 03c1399163 Update sorting and grouping behavior (#55647)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55647

Changelog: [Internal]

Updates sorting and grouping behavior of C++ API snapshot.

Reviewed By: cipolleschi

Differential Revision: D93407634

fbshipit-source-id: 255deb4cec9a1b357cdfc53b804fc59a994eafe1
2026-02-25 11:16:36 -08:00
Jakub Piasecki 5e4da8410e Fix handling of unnamed template arguments (#55646)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55646

Changelog: [Internal]

Updates the C++ API snapshot generator script to correctly handle unnamed template arguments.

Reviewed By: cipolleschi

Differential Revision: D93407624

fbshipit-source-id: 50928b596fe64fa3549cde5d69da7146b452d784
2026-02-25 11:16:36 -08:00
Jakub Piasecki 269a2ee0cb Fix indexed access in function arguments (#55645)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55645

Changelog: [Internal]

Updates the C++ api snapshot generator to correctly handle arrays of fixed size.

Reviewed By: cipolleschi

Differential Revision: D93407605

fbshipit-source-id: b64d30db04696ea54109258d7d4c4fbf43a4cc69
2026-02-25 11:16:36 -08:00
Jakub Piasecki bf4978ef58 Fix trailing return type in virtual functions (#55644)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55644

Changelog: [Internal]

Updates the C++ api snapshot generator to correctly handle trailing return types for pure virtual functions.

Reviewed By: cipolleschi

Differential Revision: D93407597

fbshipit-source-id: c0bd00752fa69eea6c75933adba7a5782a74e90d
2026-02-25 11:16:36 -08:00
Jakub Piasecki f013533487 Qualify type arguments based on scope context (#55697)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55697

Changelog: [Internal]

Implements fallback name qualification for cases where doxygen doesn't extract the full qualified name, and instead passes on the string it found in the header file.

- Adds type_qualification.py with qualify_type_str(), qualify_arguments(), and qualify_parsed_type()
- Updates member.py with close() methods for VariableMember, FunctionMember, and TypedefMember to apply type qualification
- Updates main.py with get_doxygen_params() to extract structured parameter info

Reviewed By: cipolleschi

Differential Revision: D94077825

fbshipit-source-id: 2265f5573164af1af129014082fc44fb8fceb135
2026-02-25 11:16:36 -08:00
Jakub Piasecki 357dd6b3ec Reorganize utils and add generalize type string parsing (#55698)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55698

Changelog: [Internal]

Refactors utils.py into a proper package structure and adds comprehensive argument string parsing utilities.

- Converts utils.py to utils/ package with submodules
- Adds argument_parsing.py with parse_arg_string() and related utilities
- Adds qualified_path.py with parse_qualified_path moved from old utils.py
- Renames test_member.py to test_parse_arg_string.py with updated tests for the new 4-tuple Argument format

Reviewed By: cipolleschi

Differential Revision: D94077819

fbshipit-source-id: 460d7a44e6d3e55580d996877ca63fa0c777bc23
2026-02-25 11:16:36 -08:00
Jakub Piasecki e0b90549e7 Integrate codegen into the api snapshot and allow configuration (#55642)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55642

Changelog: [Internal]

Adds a configuration file for the snapshot generation, allowing to create multiple views of the API and different flavors.

It also adds option to include codegen in the snapshot generation. Codegen needs to be executed first, and the path to its output needs to be passed when running the generation.

Reviewed By: cipolleschi

Differential Revision: D92958731

fbshipit-source-id: 42780d25b2bc04f213e697cca0b6bde07d94ca59
2026-02-25 01:12:30 -08:00
Jakub Piasecki f9db851a8d Handle concepts in the C++ API snapshot (#55695)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55695

Changelog: [Internal]

Adds support for handling concepts in the C++ API parser.

Reviewed By: NickGerleman

Differential Revision: D94074054

fbshipit-source-id: 5e8ef0b0d4d1eeb93554558bb7f80cd67d622a72
2026-02-25 01:12:30 -08:00
Jakub Piasecki e4ded3b9c0 Handle templates in the C++ API snapshot (#55693)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55693

Changelog: [Internal]

Adds support for handling template params in the C++ API parser.

Reviewed By: cipolleschi

Differential Revision: D94074045

fbshipit-source-id: b758a8ceb7f95e8a1acf0983afa0c65aeec6b756
2026-02-25 01:12:30 -08:00
Jakub Piasecki 2246457065 Handle type aliases in C++ API snapshot (#55694)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55694

Changelog: [Internal]

Adds support for handling type aliases in the c++ API snapshot

Reviewed By: cipolleschi

Differential Revision: D94074032

fbshipit-source-id: 8af8bc88e884f4b1b7f7394d1316776cc9d50d6b
2026-02-25 01:12:30 -08:00
Jakub Piasecki efc15289be Handle functions in C++ API snapshot (#55692)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55692

Changelog: [Internal]

Adds support for handling functions and methods in the C++ API parser

Reviewed By: cipolleschi

Differential Revision: D94073981

fbshipit-source-id: 1c22a8cd4584868a220974335b321d523e6a3dc2
2026-02-25 01:12:30 -08:00
Jakub Piasecki e69c08bf04 Handle enums in C++ API snapshot (#55691)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55691

Changelog: [Internal]

Adds support for handling enums in the C++ API parser.

Reviewed By: cipolleschi

Differential Revision: D94073960

fbshipit-source-id: 2c726f5ac5c33c66950463760e2592064d812400
2026-02-25 01:12:30 -08:00
Jakub Piasecki 25e402587a Add basic test cases and parser implementation (#55641)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55641

Changelog: [Internal]

Adds basic implementation of C++ API snapshot generation and snapshot tests covering the functionality.

Reviewed By: cipolleschi

Differential Revision: D90987176

fbshipit-source-id: 4243b054f98af49d49e8ce174999b44196ed3444
2026-02-25 01:12:30 -08:00
Jakub Piasecki a65d8848f2 Add basic doxygen wrapper and setup tests (#55640)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55640

Changelog: [Internal]

Adds a simple script going over the doxygen output and a test harness for snapshot testing.

Reviewed By: cipolleschi

Differential Revision: D90959837

fbshipit-source-id: fde0c1116b7c0fc10e43484e2b57ead79af706b8
2026-02-25 01:12:30 -08:00