cfg.py 文件源码

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

项目:peval 作者: fjarri 项目源码 文件源码
def _build_node_cfg(node):
    handlers = {
        ast.If: _build_if_cfg,
        ast.For: _build_loop_cfg,
        ast.While: _build_loop_cfg,
        ast.With: _build_with_cfg,
        ast.Break: _build_break_cfg,
        ast.Continue: _build_continue_cfg,
        ast.Return: _build_return_cfg,
        ast.Try: _build_try_cfg,
        }

    if type(node) in handlers:
        handler = handlers[type(node)]
    else:
        handler = _build_statement_cfg

    return handler(node)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号