Skip to main content

Module extractor

Module extractor 

Source

Structs§

SubUnit
A sub-unit extracted from a normalized function body.

Functions§

extract_sub_units
Extract candidate sub-units from a normalized AST node. Walks the tree recursively and extracts natural compound structures (if branches, match arm bodies, loop bodies, closure bodies). Each sub-tree is re-indexed to canonical placeholder form. Only sub-trees meeting min_node_count are returned.