/
githubmirror
/
react-native
Обзор
Документация
Войти
/
githubmirror
/
react-native
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
scripts/cxx-api/parser/member/friend_member.py
30 строк
859 B
Dawid Małecki
Split member definitions into smaller files (#56072)
18 мар 2026, 19:29
18 мар 2026, 19:29
756203c
Код
Авторство
О чём код?
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from __future__ import annotations from .base import Member, MemberKind class FriendMember(Member): def __init__(self, name: str, visibility: str = "public") -> None: super().__init__(name, visibility) @property def member_kind(self) -> MemberKind: return MemberKind.FRIEND def to_string( self, indent: int = 0, qualification: str | None = None, hide_visibility: bool = False, ) -> str: name = self._get_qualified_name(qualification) result = " " * indent if not hide_visibility: result += self.visibility + " " result += f"friend {name};" return result