mirroring previous topic/vern/set-ops to get branch up to date, since I'm a n00b

This commit is contained in:
Vern Paxson 2018-06-23 14:46:47 -07:00
parent e93c638f8d
commit 6449b0ab9e
4 changed files with 121 additions and 13 deletions

View file

@ -809,6 +809,12 @@ public:
// Returns true if the addition typechecked, false if not.
int RemoveFrom(Val* v) const override;
// Returns a new table that is the intersection of this
// table and the given table. Intersection is just done
// on index, not on yield value, so this really only makes
// sense for sets.
TableVal* Intersect(const TableVal* v) const;
// Expands any lists in the index into multiple initializations.
// Returns true if the initializations typecheck, false if not.
int ExpandAndInit(Val* index, Val* new_val);