mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
helper predicate for identifying type tags associated with aggregates
This commit is contained in:
parent
732633ebb4
commit
28bb39b548
1 changed files with 6 additions and 0 deletions
|
@ -920,6 +920,12 @@ inline bool IsVector(TypeTag t) { return (t == TYPE_VECTOR); }
|
|||
// True if the given type type is a string.
|
||||
inline bool IsString(TypeTag t) { return (t == TYPE_STRING); }
|
||||
|
||||
// True if the given type is a container aggregate.
|
||||
inline bool IsAggr(TypeTag tag)
|
||||
{
|
||||
return tag == TYPE_VECTOR || tag == TYPE_TABLE || tag == TYPE_RECORD;
|
||||
}
|
||||
|
||||
// True if the given type tag corresponds to the error type.
|
||||
inline bool IsErrorType(TypeTag t) { return (t == TYPE_ERROR); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue