Index: src/regexp/regexp-parser.h |
diff --git a/src/regexp/regexp-parser.h b/src/regexp/regexp-parser.h |
index 62f740d56fa173f6a130318185cb4b7a8dc89b1e..a3ef22d8b7ac8f83fe0dc777bfeb49010d780574 100644 |
--- a/src/regexp/regexp-parser.h |
+++ b/src/regexp/regexp-parser.h |
@@ -293,6 +293,10 @@ class RegExpParser BASE_EMBEDDED { |
Handle<FixedArray> CreateCaptureNameMap(); |
+ // Returns true iff the pattern contains named captures. May call |
+ // ScanForCaptures to look ahead at the remaining pattern. |
+ bool HasNamedCaptures(); |
+ |
Isolate* isolate() { return isolate_; } |
Zone* zone() const { return zone_; } |
@@ -319,12 +323,12 @@ class RegExpParser BASE_EMBEDDED { |
bool unicode_; |
int next_pos_; |
int captures_started_; |
- // The capture count is only valid after we have scanned for captures. |
- int capture_count_; |
+ int capture_count_; // Only valid after we have scanned for captures. |
bool has_more_; |
bool simple_; |
bool contains_anchor_; |
bool is_scanned_for_captures_; |
+ bool has_named_captures_; // Only valid after we have scanned for captures. |
bool failed_; |
}; |