expr.py 文件源码

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

项目:viper 作者: ethereum 项目源码 文件源码
def list_literals(self):
        if not len(self.expr.elts):
            raise StructureException("List must have elements", self.expr)
        o = []
        out_type = None
        for elt in self.expr.elts:
            o.append(Expr(elt, self.context).lll_node)
            if not out_type:
                out_type = o[-1].typ
            elif len(o) > 1 and o[-1].typ != out_type:
                out_type = MixedType()
        return LLLnode.from_list(["multi"] + o, typ=ListType(out_type, len(o)), pos=getpos(self.expr))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号