INNER CODE UNIT · Python

split_fields

stp/stp · lib/AST/genkinds.py:98

def split_fields(kindlines):
    """Create the lists of things indexed by kinds."""
    kindnames = []
    cat_bits = []
    category_names = []
    cat_index = {}

    for line in kindlines:
        match = CATEGORIES_RE.search(line)
        if match:
            category_names = match.group(1).split()
            for i, name in enumerate(category_names):
                cat_index[name] = i
            continue

        match = KIND_RE.match(line)
        if match:
            kindnames.append(match.group(1))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…