MCPcopy Create free account
hub / github.com/Tracktion/tracktion_engine / remove_tracktion_namespaces

Function remove_tracktion_namespaces

doxygen/process_source_files.py:27–43  ·  view source on GitHub ↗

Return a string of source code with any tracktion namespaces removed.

(source)

Source from the content-addressed store, hash-verified

25
26
27def remove_tracktion_namespaces(source):
28 """Return a string of source code with any tracktion namespaces removed.
29 """
30 namespace_regex = re.compile(r"\s+namespace\s+tracktion\s*{")
31
32 match = namespace_regex.search(source)
33 while (match is not None):
34 source = source[:match.start()] + source[match.end():]
35 end = get_curly_brace_scope_end(source, match.start() - 1)
36 if end != -1:
37 source = source[:end] + source[end + 1:]
38 match = namespace_regex.search(source)
39 continue
40 else:
41 raise ValueError("failed to find the end of the "
42 + match.group(1) + " namespace")
43 return source
44
45
46def add_doxygen_group(path, group_name):

Callers

nothing calls this directly

Calls 3

startMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected