This source file includes following definitions.
- ShortVisit
- PostVisit
- NullWalk
#include "util/test.h"
#include "re2/regexp.h"
#include "re2/walker-inl.h"
namespace re2 {
class NullWalker : public Regexp::Walker<bool> {
public:
NullWalker() { }
bool PostVisit(Regexp* re, bool parent_arg, bool pre_arg,
bool* child_args, int nchild_args);
bool ShortVisit(Regexp* re, bool a) {
LOG(DFATAL) << "NullWalker::ShortVisit called";
return a;
}
private:
DISALLOW_EVIL_CONSTRUCTORS(NullWalker);
};
bool NullWalker::PostVisit(Regexp* re, bool parent_arg, bool pre_arg,
bool* child_args, int nchild_args) {
return false;
}
void Regexp::NullWalk() {
NullWalker w;
w.Walk(this, false);
}
}