def convert(self):
code_type = {
ast.Assign: self.assign_code,
ast.Expr: self.expr_code,
ast.AugAssign: self.aug_assign_code,
}
for func_name in self.source_code.func_key:
self.processing_func = self.get_func_by_name(func_name)
for source in self.input_source_code:
parse = ast.parse(source)
for body in parse.body:
code_type[body.__class__](body)
self.__write_file()
评论列表
文章目录