mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
factoring to make checking of &default attributes externally accessible
This commit is contained in:
parent
18fe9d84f6
commit
ffdcc36bd5
2 changed files with 125 additions and 109 deletions
11
src/Attr.h
11
src/Attr.h
|
@ -139,5 +139,16 @@ protected:
|
|||
bool global_var;
|
||||
};
|
||||
|
||||
// Checks whether default attribute "a" is compatible with the given type.
|
||||
// "global_var" specifies whether the attribute is being associated with
|
||||
// a global variable, and "in_record" whether it's occurring inside of
|
||||
// a record declaration.
|
||||
//
|
||||
// Returns true on compatibility (which might include modifying "a"), false
|
||||
// on an error. If an error message hasn't been directly generated, then
|
||||
// it will be returned in err_msg.
|
||||
extern bool check_default_attr(Attr* a, const TypePtr& type, bool global_var, bool in_record,
|
||||
std::string& err_msg);
|
||||
|
||||
} // namespace detail
|
||||
} // namespace zeek
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue