Swift: tag -> pragma in codegen

For the use the former tags are meant for, pragma is a more
meaningful name. It now also accepts both strings and lists of strings.
This commit is contained in:
Paolo Tranquilli
2022-06-23 10:39:21 +02:00
parent 3248f7b423
commit 8d4637ddfd
5 changed files with 107 additions and 44 deletions

View File

@@ -19,7 +19,7 @@ class FormatError(Exception):
def get_ql_property(cls: schema.Class, prop: schema.Property):
common_args = dict(
type=prop.type if not prop.is_predicate else "predicate",
skip_qltest="no_qltest" in prop.tags,
skip_qltest="skip_qltest" in prop.pragmas,
is_child=prop.is_child,
is_optional=prop.is_optional,
is_predicate=prop.is_predicate,
@@ -64,7 +64,7 @@ def get_ql_class(cls: schema.Class):
final=not cls.derived,
properties=[get_ql_property(cls, p) for p in cls.properties],
dir=cls.dir,
skip_qltest="no_qltest" in cls.tags,
skip_qltest="skip_qltest" in cls.pragmas,
)