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

Side by Side Diff: src/regexp/regexp-parser.h

Issue 1571563003: [regexp] quantifier refers to the surrogate pair in unicode regexp. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@unicoderegexpatom
Patch Set: rebase Created 4 years, 11 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/regexp/regexp-parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_REGEXP_REGEXP_PARSER_H_ 5 #ifndef V8_REGEXP_REGEXP_PARSER_H_
6 #define V8_REGEXP_REGEXP_PARSER_H_ 6 #define V8_REGEXP_REGEXP_PARSER_H_
7 7
8 #include "src/objects.h" 8 #include "src/objects.h"
9 #include "src/regexp/regexp-ast.h" 9 #include "src/regexp/regexp-ast.h"
10 #include "src/zone.h" 10 #include "src/zone.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 ZoneList<T*>* list_; 94 ZoneList<T*>* list_;
95 T* last_; 95 T* last_;
96 }; 96 };
97 97
98 98
99 // Accumulates RegExp atoms and assertions into lists of terms and alternatives. 99 // Accumulates RegExp atoms and assertions into lists of terms and alternatives.
100 class RegExpBuilder : public ZoneObject { 100 class RegExpBuilder : public ZoneObject {
101 public: 101 public:
102 explicit RegExpBuilder(Zone* zone); 102 explicit RegExpBuilder(Zone* zone);
103 void AddCharacter(uc16 character); 103 void AddCharacter(uc16 character);
104 void AddUnicodeCharacter(uc32 character);
104 // "Adds" an empty expression. Does nothing except consume a 105 // "Adds" an empty expression. Does nothing except consume a
105 // following quantifier 106 // following quantifier
106 void AddEmpty(); 107 void AddEmpty();
107 void AddAtom(RegExpTree* tree); 108 void AddAtom(RegExpTree* tree);
108 void AddAssertion(RegExpTree* tree); 109 void AddAssertion(RegExpTree* tree);
109 void NewAlternative(); // '|' 110 void NewAlternative(); // '|'
110 void AddQuantifierToAtom(int min, int max, 111 void AddQuantifierToAtom(int min, int max,
111 RegExpQuantifier::QuantifierType type); 112 RegExpQuantifier::QuantifierType type);
112 RegExpTree* ToRegExp(); 113 RegExpTree* ToRegExp();
113 114
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 bool simple_; 268 bool simple_;
268 bool contains_anchor_; 269 bool contains_anchor_;
269 bool is_scanned_for_captures_; 270 bool is_scanned_for_captures_;
270 bool failed_; 271 bool failed_;
271 }; 272 };
272 273
273 } // namespace internal 274 } // namespace internal
274 } // namespace v8 275 } // namespace v8
275 276
276 #endif // V8_REGEXP_REGEXP_PARSER_H_ 277 #endif // V8_REGEXP_REGEXP_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | src/regexp/regexp-parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698