| Index: src/regexp/regexp-parser.h
|
| diff --git a/src/regexp/regexp-parser.h b/src/regexp/regexp-parser.h
|
| index 6142a9ea530fc091ec1eb6aa9e09153950865ac9..31e7d442803700d61e7758e2b6233b867c62452e 100644
|
| --- a/src/regexp/regexp-parser.h
|
| +++ b/src/regexp/regexp-parser.h
|
| @@ -262,6 +262,30 @@ class RegExpParser BASE_EMBEDDED {
|
| // Return the 1-indexed RegExpCapture object, allocate if necessary.
|
| RegExpCapture* GetCapture(int index);
|
|
|
| + // Creates a new named capture at the specified index. Must be called exactly
|
| + // once for each named capture. Fails if a capture with the same name is
|
| + // encountered.
|
| + bool CreateNamedCaptureAtIndex(Vector<const uc16> name, int index);
|
| +
|
| + // Parses the name of a capture group (?<name>pattern). The name must adhere
|
| + // to IdentifierName in the ECMAScript standard.
|
| + Vector<const uc16> ParseCaptureGroupName();
|
| +
|
| + bool ParseNamedBackReference(RegExpBuilder* builder,
|
| + RegExpParserState* state);
|
| +
|
| + // Looks up the index of the capture group with the specified name. Returns -1
|
| + // in case no such group is found.
|
| + int LookupCaptureGroupIndex(Vector<const uc16> name);
|
| +
|
| + // After the initial parsing pass, patch corresponding RegExpCapture objects
|
| + // into all RegExpBackReferences. This is done after initial parsing in order
|
| + // to avoid complicating cases in which references comes before the capture.
|
| + void PatchNamedBackReferences();
|
| +
|
| + Handle<FixedArray> CreateCaptureNameMap();
|
| + void FreeCaptureStrings();
|
| +
|
| Isolate* isolate() { return isolate_; }
|
| Zone* zone() const { return zone_; }
|
|
|
| @@ -278,6 +302,9 @@ class RegExpParser BASE_EMBEDDED {
|
| Zone* zone_;
|
| Handle<String>* error_;
|
| ZoneList<RegExpCapture*>* captures_;
|
| + ZoneList<RegExpCapture*>* named_captures_;
|
| + ZoneList<RegExpBackReference*>* named_back_references_;
|
| + ZoneList<Vector<const uc16>> capture_strings_;
|
| FlatStringReader* in_;
|
| uc32 current_;
|
| bool ignore_case_;
|
|
|