diff options
author | Shannon McPherson <shannon@lunarg.com> | 2018-10-29 16:04:34 -0600 |
---|---|---|
committer | Shannon McPherson <shannon@lunarg.com> | 2018-10-31 09:45:08 -0600 |
commit | 95cc5130b4403594ffd896ed10e989232dd9c27f (patch) | |
tree | 42843fa03275f9b584e51bde5b92e7217ebd2718 | |
parent | 7510c83a56a5325f9a0eb7f520d39c86fccb03a6 (diff) | |
download | Vulkan-Tools-95cc5130b4403594ffd896ed10e989232dd9c27f.tar.gz Vulkan-Tools-95cc5130b4403594ffd896ed10e989232dd9c27f.tar.bz2 Vulkan-Tools-95cc5130b4403594ffd896ed10e989232dd9c27f.zip |
scripts: Extend scope of LaTeX handling
The 1.1.90 header introduced the use of "\textrm" in `vk.xml`, requiring
changes to `scripts/vulkan_tools_helper_file_generator.py`
Change-Id: Ia43b516ac56b4e3cd82272761ef1b524eea72944
-rw-r--r-- | scripts/vulkan_tools_helper_file_generator.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/vulkan_tools_helper_file_generator.py b/scripts/vulkan_tools_helper_file_generator.py index e5ddcb43..e6e690fe 100644 --- a/scripts/vulkan_tools_helper_file_generator.py +++ b/scripts/vulkan_tools_helper_file_generator.py @@ -272,9 +272,9 @@ class HelperFileOutputGenerator(OutputGenerator): decoratedName = '{}/{}'.format(*match.group(2, 3)) else: # Matches expressions similar to 'latexmath : [dataSize \over 4]' - match = re.match(r'latexmath\s*\:\s*\[\s*(\w+)\s*\\over\s*(\d+)\s*\]', source) - name = match.group(1) - decoratedName = '{}/{}'.format(*match.group(1, 2)) + match = re.match(r'latexmath\s*\:\s*\[\s*(\\textrm\{)?(\w+)\}?\s*\\over\s*(\d+)\s*\]', source) + name = match.group(2) + decoratedName = '{}/{}'.format(*match.group(2, 3)) return name, decoratedName # # Retrieve the value of the len tag @@ -296,7 +296,7 @@ class HelperFileOutputGenerator(OutputGenerator): result = str(result).replace('::', '->') return result # - # Check if a structure is or contains a dispatchable (dispatchable = True) or + # Check if a structure is or contains a dispatchable (dispatchable = True) or # non-dispatchable (dispatchable = False) handle def TypeContainsObjectHandle(self, handle_type, dispatchable): if dispatchable: @@ -1229,4 +1229,3 @@ class HelperFileOutputGenerator(OutputGenerator): return self.GenerateTypeMapHelperHeader() else: return 'Bad Helper File Generator Option %s' % self.helper_file_type - |