def syn_Compare(self, ctx, e):
left, ops, comparators = e.left, e.ops, e.comparators
for op in ops:
if not isinstance(op, (ast.Eq, ast.NotEq, ast.Is, ast.IsNot)):
raise _errors.TyError("Type bool 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 self
评论列表
文章目录