private static bool ShallowEq(MapComprehension expr1, MapComprehension expr2) { return(expr1.Finite == expr2.Finite); }
void MapComprehensionExpr(IToken mapToken, bool finite, out Expression e, bool allowSemi, bool allowLambda) { Contract.Ensures(Contract.ValueAtReturn(out e) != null); BoundVar bv; List<BoundVar> bvars = new List<BoundVar>(); Expression range = null; Expression body; Attributes attrs = null; IdentTypeOptional(out bv); bvars.Add(bv); while (la.kind == 46) { Attribute(ref attrs); } if (la.kind == 23) { Get(); Expression(out range, true, true); } QSep(); Expression(out body, allowSemi, allowLambda); e = new MapComprehension(mapToken, finite, bvars, range ?? new LiteralExpr(mapToken, true), body, attrs); }