def export_and_highlight_range_if_in_current_file(editor, range, highlight_style): """"Caution. You must still own the range's translation unit.""" exported_range = ExportedRange.from_clang_range(range) highlight_range_if_in_current_file(editor, exported_range, highlight_style)
def collect_ranges(): for highlight_style, action in styles_and_actions: ranges = action(memoized_translation_unit) for range in ranges: yield ExportedRange.from_clang_range(range), highlight_style