mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00
introduce internal "mask" expression node to avoid mixed-type overloading of "/"
This commit is contained in:
parent
b53a025b1e
commit
434a7e059d
6 changed files with 55 additions and 13 deletions
|
@ -633,7 +633,10 @@ expr:
|
|||
| expr '/' expr
|
||||
{
|
||||
set_location(@1, @3);
|
||||
$$ = new DivideExpr({AdoptRef{}, $1}, {AdoptRef{}, $3});
|
||||
if ( $1->GetType()->Tag() == TYPE_ADDR )
|
||||
$$ = new MaskExpr({AdoptRef{}, $1}, {AdoptRef{}, $3});
|
||||
else
|
||||
$$ = new DivideExpr({AdoptRef{}, $1}, {AdoptRef{}, $3});
|
||||
}
|
||||
|
||||
| expr '%' expr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue