padl.dumptools.ast_utils

class padl.dumptools.ast_utils.Position(lineno: int, end_lineno: int, col_offset: int, end_col_offset: int)
padl.dumptools.ast_utils.get_position(source, node)

Get the position of node in source.

padl.dumptools.ast_utils.get_source_segment(source, node)

Get the source segment corresponding to node.

Same as ast.get_source_segment() in python>=3.8