mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 02:58:20 +00:00
Add opaque type to lexer, parser, and BroType.
This commit is contained in:
parent
e2fdf16e0c
commit
aba8275346
4 changed files with 69 additions and 1 deletions
19
src/Type.h
19
src/Type.h
|
@ -29,6 +29,7 @@ typedef enum {
|
|||
TYPE_LIST,
|
||||
TYPE_FUNC,
|
||||
TYPE_FILE,
|
||||
TYPE_OPAQUE,
|
||||
TYPE_VECTOR,
|
||||
TYPE_TYPE,
|
||||
TYPE_ERROR
|
||||
|
@ -499,6 +500,24 @@ protected:
|
|||
BroType* yield;
|
||||
};
|
||||
|
||||
class OpaqueType : public BroType {
|
||||
public:
|
||||
OpaqueType(const string& name);
|
||||
virtual ~OpaqueType() { };
|
||||
|
||||
const string& Name() { return name; }
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
|
||||
protected:
|
||||
OpaqueType() { }
|
||||
|
||||
// TODO: Serialization semantics not yet defined.
|
||||
//DECLARE_SERIAL(OpaqueType)
|
||||
|
||||
const string name;
|
||||
};
|
||||
|
||||
class EnumType : public BroType {
|
||||
public:
|
||||
EnumType(const string& arg_name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue