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

Unified Diff: regexp2000/src/ast.h

Issue 9110: Experimental: Fixed bug in RegExp Parser. Added feature counting in parser. (Closed)
Patch Set: Merged changes to tip of experimental branch. Created 12 years, 1 month 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 | « no previous file | regexp2000/src/jsregexp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: regexp2000/src/ast.h
diff --git a/regexp2000/src/ast.h b/regexp2000/src/ast.h
index 5708271e02b8e803f36799c6a0670ca8e3b5d0dc..ffd20cfc6f85b34cfdd97c6190998149030b94a4 100644
--- a/regexp2000/src/ast.h
+++ b/regexp2000/src/ast.h
@@ -1298,9 +1298,9 @@ class RegExpQuantifier: public RegExpTree {
int max() { return max_; }
bool is_greedy() { return is_greedy_; }
RegExpTree* body() { return body_; }
- // We just use a very large integer value as infinity because 1^31
+ // We just use a very large integer value as infinity because 2^30
// is infinite in practice.
- static const int kInfinity = (1 << 31);
+ static const int kInfinity = (1 << 30);
private:
int min_;
int max_;
@@ -1311,13 +1311,15 @@ class RegExpQuantifier: public RegExpTree {
class RegExpCapture: public RegExpTree {
public:
- explicit RegExpCapture(RegExpTree* body)
- : body_(body) { }
+ explicit RegExpCapture(RegExpTree* body, int index)
+ : body_(body), index_(index) { }
virtual void* Accept(RegExpVisitor* visitor, void* data);
virtual RegExpCapture* AsCapture();
RegExpTree* body() { return body_; }
+ int index() { return index_; }
private:
RegExpTree* body_;
+ int index_;
};
« no previous file with comments | « no previous file | regexp2000/src/jsregexp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698