mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
convenience functions to check for aggregate types
This commit is contained in:
parent
743f5cfef6
commit
d9b67edf52
1 changed files with 8 additions and 0 deletions
|
@ -840,6 +840,14 @@ inline bool IsAggr(TypeTag tag)
|
|||
{
|
||||
return tag == TYPE_VECTOR || tag == TYPE_TABLE || tag == TYPE_RECORD;
|
||||
}
|
||||
inline bool IsAggr(const Type* t)
|
||||
{
|
||||
return IsAggr(t->Tag());
|
||||
}
|
||||
inline bool IsAggr(const TypePtr& t)
|
||||
{
|
||||
return IsAggr(t->Tag());
|
||||
}
|
||||
|
||||
// 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