mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
set intersection implemented
This commit is contained in:
parent
6449b0ab9e
commit
072a25df0f
2 changed files with 13 additions and 11 deletions
|
@ -860,6 +860,9 @@ Val* BinaryExpr::SetFold(Val* v1, Val* v2) const
|
|||
if ( tag != EXPR_AND && tag != EXPR_OR && tag != EXPR_SUB )
|
||||
BadTag("BinaryExpr::SetFold");
|
||||
|
||||
if ( tag == EXPR_AND )
|
||||
return tv1->Intersect(tv2);
|
||||
|
||||
// TableVal* result = new TableVal(v1->Type()->AsTableType());
|
||||
TableVal* result = v1->Clone()->AsTableVal();
|
||||
|
||||
|
@ -875,6 +878,9 @@ Val* BinaryExpr::SetFold(Val* v1, Val* v2) const
|
|||
reporter->InternalError("set difference failed to type check");
|
||||
}
|
||||
|
||||
else
|
||||
BadTag("BinaryExpr::SetFold", expr_name(tag));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue