Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index f7b8889de5010c85d815ff8b01e3203af8719c23..c7419798b663c48ad8cd47eb8fffdb272881bae3 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -9267,11 +9267,15 @@ class String: public Name { |
virtual Handle<String> GetPrefix() = 0; |
virtual Handle<String> GetSuffix() = 0; |
+ // A named capture can be invalid (if it is not specified in the pattern), |
+ // unmatched (specified but not matched in the current string), and matched. |
+ enum CaptureState { INVALID, UNMATCHED, MATCHED }; |
+ |
virtual int CaptureCount() = 0; |
virtual bool HasNamedCaptures() = 0; |
virtual MaybeHandle<String> GetCapture(int i, bool* capture_exists) = 0; |
virtual MaybeHandle<String> GetNamedCapture(Handle<String> name, |
- bool* capture_exists) = 0; |
+ CaptureState* state) = 0; |
virtual ~Match() {} |
}; |