MCPcopy Create free account
hub / github.com/GRAnimated/MinecraftLCE / replace_id

Method replace_id

tools/lint.py:322–328  ·  view source on GitHub ↗
(self, id_file, line, hex_id, num_str)

Source from the content-addressed store, hash-verified

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
330def run_clang_format(file_path, version):
331 # so debian based distro users can just pass --version {ver}

Callers 1

string_idsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected