diff options
author | Jon Leech <[email protected]> | 2023-02-16 05:30:42 -0800 |
---|---|---|
committer | Jon Leech <[email protected]> | 2023-02-16 06:09:12 -0800 |
commit | bd6443d28f2ebecedfb839b52d612011ba623d14 (patch) | |
tree | 5475e194059da9a2fbb0e0393d905bd2f0cb854c /registry/spec_tools | |
parent | e8b8e06d092ab406b097907ecaae1a8aae9c7d53 (diff) | |
download | Vulkan-Headers-bd6443d28f2ebecedfb839b52d612011ba623d14.tar.gz Vulkan-Headers-bd6443d28f2ebecedfb839b52d612011ba623d14.zip |
Update for Vulkan-Docs 1.3.241v1.3.241
Diffstat (limited to 'registry/spec_tools')
-rw-r--r-- | registry/spec_tools/conventions.py | 11 | ||||
-rw-r--r-- | registry/spec_tools/util.py | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/registry/spec_tools/conventions.py b/registry/spec_tools/conventions.py index b314ee7..faca3a2 100644 --- a/registry/spec_tools/conventions.py +++ b/registry/spec_tools/conventions.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -i # -# Copyright 2013-2022 The Khronos Group Inc. +# Copyright 2013-2023 The Khronos Group Inc. # # SPDX-License-Identifier: Apache-2.0 @@ -34,6 +34,11 @@ TYPES_KNOWN_ALWAYS_VALID = set(('char', # Split an extension name into vendor ID and name portions EXT_NAME_DECOMPOSE_RE = re.compile(r'[A-Z]+_(?P<vendor>[A-Z]+)_(?P<name>[\w_]+)') +# Match an API version name. +# This could be refined further for specific APIs. +API_VERSION_NAME_RE = re.compile(r'[A-Z]+_VERSION_[0-9]') + + class ProseListFormats(Enum): """A connective, possibly with a quantifier.""" AND = 0 @@ -443,3 +448,7 @@ class ConventionsBase(abc.ABC): reference pages.""" return '' + def is_api_version_name(self, name): + """Return True if name is an API version name.""" + + return API_VERSION_NAME_RE.match(name) is not None diff --git a/registry/spec_tools/util.py b/registry/spec_tools/util.py index 4e1093d..bf25845 100644 --- a/registry/spec_tools/util.py +++ b/registry/spec_tools/util.py @@ -1,6 +1,6 @@ """Utility functions not closely tied to other spec_tools types.""" # Copyright (c) 2018-2019 Collabora, Ltd. -# Copyright 2013-2022 The Khronos Group Inc. +# Copyright 2013-2023 The Khronos Group Inc. # # SPDX-License-Identifier: Apache-2.0 |