rewrite.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:sslstrip-hsts-openwrt 作者: adde88 项目源码 文件源码
def set_location(node, lineno, col_offset):
    """Set node location information recursively."""
    def _fix(node, lineno, col_offset):
        if "lineno" in node._attributes:
            node.lineno = lineno
        if "col_offset" in node._attributes:
            node.col_offset = col_offset
        for child in ast.iter_child_nodes(node):
            _fix(child, lineno, col_offset)
    _fix(node, lineno, col_offset)
    return node
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号