tac_to_ivy.py 文件源码

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

项目:pythia 作者: elazarg 项目源码 文件源码
def ivy_type_of_lit(self, x):
        ast_class = parse_literal_expression(x)
        if ast_class is ast.Num:
            return 't_intbool'
        elif ast_class is ast.Str:
            return 't_str'
        elif ast_class is ast.NameConstant and x in ['True', 'False']:
            return 't_intbool'
        elif ast_class is ast.NameConstant and x == 'None':
            return 't_none'
        else:
            return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号