Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1433)

Unified Diff: third_party/re2/re2/testing/null_walker.cc

Issue 1544433002: Replace RE2 import with a dependency (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-Added LICENSE and OWNERS file Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/re2/re2/testing/mimics_pcre_test.cc ('k') | third_party/re2/re2/testing/parse_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/re2/re2/testing/null_walker.cc
diff --git a/third_party/re2/re2/testing/null_walker.cc b/third_party/re2/re2/testing/null_walker.cc
deleted file mode 100644
index bc943f47c1b9a74ad33e8710a9035ccdeddfeb51..0000000000000000000000000000000000000000
--- a/third_party/re2/re2/testing/null_walker.cc
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2009 The RE2 Authors. All Rights Reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "util/test.h"
-#include "re2/regexp.h"
-#include "re2/walker-inl.h"
-
-namespace re2 {
-
-// Null walker. For benchmarking the walker itself.
-
-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) {
- // Should never be called: we use Walk not WalkExponential.
- LOG(DFATAL) << "NullWalker::ShortVisit called";
- return a;
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NullWalker);
-};
-
-// Called after visiting re's children. child_args contains the return
-// value from each of the children's PostVisits (i.e., whether each child
-// can match an empty string). Returns whether this clause can match an
-// empty string.
-bool NullWalker::PostVisit(Regexp* re, bool parent_arg, bool pre_arg,
- bool* child_args, int nchild_args) {
- return false;
-}
-
-// Returns whether re can match an empty string.
-void Regexp::NullWalk() {
- NullWalker w;
- w.Walk(this, false);
-}
-
-} // namespace re2
« no previous file with comments | « third_party/re2/re2/testing/mimics_pcre_test.cc ('k') | third_party/re2/re2/testing/parse_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698