Move binpac code into the main Zeek repository

This is based on commit 48f75b5f6415fe9d597e3e991cec635b1bc400dc from
the binpac repository.
This commit is contained in:
Tim Wojtulewicz 2025-08-04 13:49:52 -07:00
parent a2680d5eca
commit ff26835976
112 changed files with 14586 additions and 8 deletions

View file

@ -0,0 +1,35 @@
#ifndef pac_enum_h
#define pac_enum_h
#include "pac_decl.h"
class Enum {
public:
Enum(ID* id, Expr* expr = 0);
~Enum();
void GenHeader(Output* out_h, int* pval);
private:
ID* id_;
Expr* expr_;
};
class EnumDecl : public Decl {
public:
EnumDecl(ID* id, EnumList* enumlist);
~EnumDecl() override;
Type* DataType() const { return datatype_; }
void Prepare() override;
void GenForwardDeclaration(Output* out_h) override;
void GenCode(Output* out_h, Output* out_cc) override;
private:
EnumList* enumlist_;
Type* datatype_;
TypeDecl* extern_typedecl_;
};
#endif // pac_enum_h