aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgle6ru381 <gle6ru381@yandex-team.com>2023-09-13 00:00:04 +0300
committergle6ru381 <gle6ru381@yandex-team.com>2023-09-13 00:24:35 +0300
commit711341d8169f9a884dbe0b41a4198ea5c43b7525 (patch)
tree8761e6fb65aca78eca815b636d5bd4aa94f26fd6
parent4cbafdf330967e4ac0bb90d0d943b15c5c0e90f3 (diff)
downloadydb-711341d8169f9a884dbe0b41a4198ea5c43b7525.tar.gz
Add bitfield enums internal field
Добавил маску для передачи битфилдов в платформу и проверку соответствия видимости полей перечисления значению
-rw-r--r--build/plugins/maps_mobile_idl.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/build/plugins/maps_mobile_idl.py b/build/plugins/maps_mobile_idl.py
index 92989b35ed..8ce32d06d7 100644
--- a/build/plugins/maps_mobile_idl.py
+++ b/build/plugins/maps_mobile_idl.py
@@ -115,7 +115,8 @@ class RegExp:
VECTOR = r'\bvector\b'
DICTIONARY = r'\bdictionary\b'
ANY = r'\bany[^_]'
- ENUM = r'\benum\b'
+ ENUM = r'\b(?<!bitfield )enum\b'
+ BITFIELD_ENUM = r'\bbitfield enum\b'
TIME = r'\b(time_interval|abs_timestamp|rel_timestamp)\b'
BITMAP = r'\bbitmap\b'
VIEW_PROVIDER = r'\bview_provider\b'
@@ -686,6 +687,15 @@ class IdlFileProcessor:
ios_output_includes={self._context.runtime_include('verify_and_run.h')},
)
+ # bitfield enum rule
+ self._create_or_rule(
+ rules={
+ self._create_reg_exp_rule(RegExp.BITFIELD_ENUM),
+ },
+ ios_output_types={OutputType.IOS_PRIVATE_HEADER},
+ android_output_types={OutputType.ANDROID_HEADER},
+ )
+
if self._context.unit.enabled("MAPS_MOBILE_USE_STD_VARIANT"):
variant_header = 'variant'
variant_serialization_header = self.context.runtime_include('serialization/variant.hpp')