INNER CODE UNIT · Python

k

apistol78/traktor · scripts/generate-node-emitter-capture.py:58

        k = j + 1
        while k < n and lines[k].rstrip() != "}":
            k += 1
        if k >= n:
            break
        body = "".join(lines[start:k + 1]).rstrip("\n")
        funcs[name] = body
        i = k + 1
    return funcs


def extract_registrations(text):
    """Return { node_type_short_name: function_name } from the emitter map."""
    reg = re.compile(
        r"m_emitters\[\s*&\s*type_of<\s*(\w+)\s*>\(\)\s*\]\s*=\s*new\s+EmitterCast<\s*\w+\s*>\(\s*(\w+)\s*\)"
    )
    mapping = {}
    for m in reg.finditer(text):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…