INNER CODE UNIT · Python

i

Kotlin/kandy · util/kandy-samples-utils/nb_to_doc.py:278

    i = start_index + 1

    while i < len(lines) and (brace_count > 0 or (brace_count == 0 and '{' not in line)):
        next_line = lines[i]
        current_lines.append(next_line)
        brace_count += next_line.count('{') - next_line.count('}')
        i += 1

    full_decl = '\n'.join(current_lines)
    return (decl_type, full_decl), i


def _extract_variable_declaration(lines: List[str], start_index: int) -> Tuple[Tuple[str, str], int]:
    """
    Extract a variable declaration from lines.

    Args:
        lines: List of code lines

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…