parse.py 文件源码

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

项目:atom-tracer 作者: OmarShehata 项目源码 文件源码
def visit_FunctionDef(self,node):
        funcStart = node.lineno
        funcEnd = node.body[len(node.body)-1].lineno
        self.functions[node.name] = {'start':funcStart,'end':funcEnd}
        #Grab the arguments
        argList = node.args.args
        for argNode in argList:
            argName = argNode.arg
            varObj = {'name':argName,'line':node.lineno,'start':node.lineno,'col':-1,'end':funcEnd,'is_arg':True}
            self.varList.append(varObj)
        ast.NodeVisitor.generic_visit(self, node)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号