(self, id_file, line, hex_id, num_str)
| 320 | |
| 321 | |
| 322 | def replace_id(self, id_file, line, hex_id, num_str): |
| 323 | pattern = r'constexpr u32 (\w+) = 0x' + hex_id |
| 324 | match = re.search(pattern, id_file) |
| 325 | if match: |
| 326 | const_name = match.group(1) |
| 327 | return line.replace(num_str, "StringIDs::" + const_name), const_name, True |
| 328 | return line, "", False |
| 329 | |
| 330 | def run_clang_format(file_path, version): |
| 331 | # so debian based distro users can just pass --version {ver} |