INNER CODE UNIT · Python

j

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

        j = i + 1
        while j < n and lines[j].rstrip() != "{":
            # Bail if another signature appears before the body opens.
            if sig.match(lines[j]):
                break
            j += 1
        if j >= n or lines[j].rstrip() != "{":
            i += 1
            continue
        # Capture until the matching column-0 '}'. Inner braces are indented,
        # so the first line equal to '}' closes the function.
        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

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…