def syn_Compare(self, ctx, e):
left, ops, comparators = e.left, e.ops, e.comparators
for op in ops:
if isinstance(op, (ast.Lt, ast.LtE, ast.Gt, ast.GtE)):
raise _errors.TyError("No ordering relation on complex numbers.", e)
elif isinstance(op, (ast.In, ast.NotIn)):
raise _errors.TyError("Type complex does not support this operator.", op)
for e_ in _util.tpl_cons(left, comparators):
if hasattr(e_, 'match'):
continue # already synthesized
ctx.ana(e_, self)
return _boolean.boolean
评论列表
文章目录