Add opaque type to lexer, parser, and BroType.

This commit is contained in:
Matthias Vallentin 2012-11-28 19:49:46 -08:00
parent e2fdf16e0c
commit aba8275346
4 changed files with 69 additions and 1 deletions

View file

@ -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);