mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
Initial import of svn+ssh:://svn.icir.org/bro/trunk/bro as of r7088
This commit is contained in:
commit
61757ac78b
1383 changed files with 380824 additions and 0 deletions
44
src/Traverse.h
Normal file
44
src/Traverse.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
// $Id: Traverse.h 6219 2008-10-01 05:39:07Z vern $
|
||||
//
|
||||
// See the file "COPYING" in the main distribution directory for copyright.
|
||||
|
||||
#ifndef traverse_h
|
||||
#define traverse_h
|
||||
|
||||
#include "Obj.h"
|
||||
#include "Stmt.h"
|
||||
#include "Expr.h"
|
||||
#include "ID.h"
|
||||
#include "Scope.h"
|
||||
|
||||
#include "TraverseTypes.h"
|
||||
|
||||
class TraversalCallback {
|
||||
public:
|
||||
TraversalCallback() { current_scope = 0; }
|
||||
virtual ~TraversalCallback() {}
|
||||
|
||||
virtual TraversalCode PreFunction(const Func*) { return TC_CONTINUE; }
|
||||
virtual TraversalCode PostFunction(const Func*) { return TC_CONTINUE; }
|
||||
|
||||
virtual TraversalCode PreStmt(const Stmt*) { return TC_CONTINUE; }
|
||||
virtual TraversalCode PostStmt(const Stmt*) { return TC_CONTINUE; }
|
||||
|
||||
virtual TraversalCode PreExpr(const Expr*) { return TC_CONTINUE; }
|
||||
virtual TraversalCode PostExpr(const Expr*) { return TC_CONTINUE; }
|
||||
|
||||
virtual TraversalCode PreID(const ID*) { return TC_CONTINUE; }
|
||||
virtual TraversalCode PostID(const ID*) { return TC_CONTINUE; }
|
||||
|
||||
virtual TraversalCode PreTypedef(const ID*) { return TC_CONTINUE; }
|
||||
virtual TraversalCode PostTypedef(const ID*) { return TC_CONTINUE; }
|
||||
|
||||
virtual TraversalCode PreDecl(const ID*) { return TC_CONTINUE; }
|
||||
virtual TraversalCode PostDecl(const ID*) { return TC_CONTINUE; }
|
||||
|
||||
Scope* current_scope;
|
||||
};
|
||||
|
||||
TraversalCode traverse_all(TraversalCallback* cb);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue