mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00
switch to ID definition regions; reworked driver functions; more info for reporting uncompilable functions
This commit is contained in:
parent
83a0d89caf
commit
da6ac0b521
15 changed files with 619 additions and 581 deletions
|
@ -33,13 +33,21 @@ string scope_prefix(int scope)
|
|||
return scope_prefix(to_string(scope));
|
||||
}
|
||||
|
||||
bool is_CPP_compilable(const ProfileFunc* pf)
|
||||
bool is_CPP_compilable(const ProfileFunc* pf, const char** reason)
|
||||
{
|
||||
if ( pf->NumWhenStmts() > 0 )
|
||||
{
|
||||
if ( reason )
|
||||
*reason = "use of \"when\"";
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( pf->TypeSwitches().size() > 0 )
|
||||
{
|
||||
if ( reason )
|
||||
*reason = "use of type-based \"switch\"";
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue