• Home
  • Raw
  • Download

Lines Matching +full:restore +full:- +full:keys

3 # Copyright 2015-2021 The Khronos Group Inc.
5 # SPDX-License-Identifier: Apache-2.0
7 # checkLinks.py - validate link/reference API constructs in files
12 # -follow attempt to follow include:: directives. This script isn't # an
14 # -info print some internal diagnostics.
15 # -paramcheck attempt to validate param: names against the surrounding
18 # -fatal unvalidatable links cause immediate error exit from the script.
23 # API, e.g. 'makeAllExts checklinks'; otherwise many false-flagged errors
33 curLine = -1
42 if (curFile not in emittedPrefix.keys()):
45 print('-------------------------------')
76 if (value in dict.keys()):
99 # Look for missing vk prefixes (quirky since it's case-dependent)
122 # Matches asciidoc single-line section tags
146 # precede the regexp with [^A-Za-z], but this didn't catch macros
155 # infile - filename to validate
156 # follow - if True, recursively follow include:: directives
157 # paramCheck - if True, try to verify pname: refers to valid
159 # included - if True, function was called recursively
160 # fatalExit - if True, validation errors cause an error exit immediately
162 # fname:vkBlah - Vulkan command name (generates internal link)
163 # flink:vkBlah - Vulkan command name
164 # sname:VkBlah - Vulkan struct name (generates internal link)
165 # slink:VkBlah - Vulkan struct name
166 # elink:VkEnumName - Vulkan enumeration ('enum') type name (generates internal link)
167 # ename:VK_BLAH - Vulkan enumerant token name
168 # pname:name - parameter name to a command or a struct member
169 # tlink:name - Other Vulkan type name (generates internal link)
170 # tname:name - Other Vulkan type name
185 error('No such file', curFile, '- skipping check')
186 # Restore global state before exiting the function
192 fp = open(curFile, 'r', encoding='utf-8')
228 # e.g. only back-to-back includes separated by blank lines would be
231 if (tag in protos.keys()):
242 if (tag in structs.keys()):
263 if (value not in protos.keys()):
266 if (value not in structs.keys() and
267 value not in handles.keys()):
270 if (value not in consts.keys() and value not in defines.keys()):
273 if (value not in enums.keys() and value not in flags.keys()):
276 # They can be recombined once both are error-clean
278 if (value not in funcpointers.keys() and value not in flags.keys()):
281 if (value not in funcpointers.keys() and value not in flags.keys()):
307 info('----- returning from:', infile, 'to parent file', '-----')
313 # Restore global state before exiting the function
328 if (file == '-follow'):
330 elif (file == '-info'):
332 elif file == '-paramcheck':
334 elif (file == '-fatal'):
346 …print('Need arguments: [-follow] [-info] [-paramcheck] [-fatal] infile [infile...]', file=sys.stde…