mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Support namespaces / modules in bif. Checkpoint.
(now actually commiting all the files) This change is actually two-fold: a) bif's now accept module XYZ; statements and module::ID for function, const, event, enum, etc. declartation b) Added C++-namespaces to variables, functions, etc. that are declared in bif but accessed from C++ This required some (lightweight) re-factoring of the C++ codes. Note, event's don't have their own C++ namespace yet, since this would require a rather huge re-factoring. Compiles and passes test suite. New namespace feature not tested yet. Documentation to follow.
This commit is contained in:
parent
86fdd1dcf3
commit
f79ea244fa
31 changed files with 332 additions and 228 deletions
10
src/Scope.h
10
src/Scope.h
|
@ -1,5 +1,6 @@
|
|||
// $Id: Scope.h 6219 2008-10-01 05:39:07Z vern $
|
||||
//
|
||||
//
|
||||
// See the file "COPYING" in the main distribution directory for copyright.
|
||||
|
||||
#ifndef scope_h
|
||||
|
@ -11,6 +12,7 @@
|
|||
#include "Obj.h"
|
||||
#include "BroList.h"
|
||||
#include "TraverseTypes.h"
|
||||
#include "module_util.h"
|
||||
|
||||
class ID;
|
||||
class BroType;
|
||||
|
@ -59,14 +61,6 @@ protected:
|
|||
id_list* inits;
|
||||
};
|
||||
|
||||
static const char* GLOBAL_MODULE_NAME = "GLOBAL";
|
||||
|
||||
extern string extract_module_name(const char* name);
|
||||
extern string normalized_module_name(const char* module_name); // w/o ::
|
||||
|
||||
// Concatenates module_name::var_name unless var_name is already fully
|
||||
// qualified, in which case it is returned unmodified.
|
||||
extern string make_full_var_name(const char* module_name, const char* var_name);
|
||||
|
||||
extern bool in_debug;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue