mirror of
https://github.com/zeek/zeek.git
synced 2025-10-01 22:28:20 +00:00
fix for '?' operator precedence when compiling scripts to C++
This commit is contained in:
parent
ca49e69aac
commit
f619cc2a89
1 changed files with 1 additions and 1 deletions
|
@ -260,7 +260,7 @@ string CPPCompile::GenCondExpr(const Expr* e, GenType gt) {
|
||||||
if ( op1->GetType()->Tag() == TYPE_VECTOR )
|
if ( op1->GetType()->Tag() == TYPE_VECTOR )
|
||||||
return string("vector_select__CPP(") + gen1 + ", " + gen2 + ", " + gen3 + ")";
|
return string("vector_select__CPP(") + gen1 + ", " + gen2 + ", " + gen3 + ")";
|
||||||
|
|
||||||
return string("(") + gen1 + ") ? (" + gen2 + ") : (" + gen3 + ")";
|
return string("((") + gen1 + ") ? (" + gen2 + ") : (" + gen3 + "))";
|
||||||
}
|
}
|
||||||
|
|
||||||
string CPPCompile::GenCallExpr(const CallExpr* c, GenType gt, bool top_level) {
|
string CPPCompile::GenCallExpr(const CallExpr* c, GenType gt, bool top_level) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue