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

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

Issue 1681893002: [regexp] parse RegExpUnicodeEscapeSequence according to spec. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comments Created 4 years, 10 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 RegExpBuilder(Zone* zone, bool ignore_case, bool unicode); 102 RegExpBuilder(Zone* zone, bool ignore_case, bool unicode);
103 void AddCharacter(uc16 character); 103 void AddCharacter(uc16 character);
104 void AddUnicodeCharacter(uc32 character); 104 void AddUnicodeCharacter(uc32 character);
105 void AddEscapedUnicodeCharacter(uc32 character);
105 // "Adds" an empty expression. Does nothing except consume a 106 // "Adds" an empty expression. Does nothing except consume a
106 // following quantifier 107 // following quantifier
107 void AddEmpty(); 108 void AddEmpty();
108 void AddCharacterClass(RegExpCharacterClass* cc); 109 void AddCharacterClass(RegExpCharacterClass* cc);
109 void AddCharacterClassForDesugaring(uc32 c); 110 void AddCharacterClassForDesugaring(uc32 c);
110 void AddAtom(RegExpTree* tree); 111 void AddAtom(RegExpTree* tree);
111 void AddTerm(RegExpTree* tree); 112 void AddTerm(RegExpTree* tree);
112 void AddAssertion(RegExpTree* tree); 113 void AddAssertion(RegExpTree* tree);
113 void NewAlternative(); // '|' 114 void NewAlternative(); // '|'
114 bool AddQuantifierToAtom(int min, int max, 115 bool AddQuantifierToAtom(int min, int max,
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 bool simple_; 290 bool simple_;
290 bool contains_anchor_; 291 bool contains_anchor_;
291 bool is_scanned_for_captures_; 292 bool is_scanned_for_captures_;
292 bool failed_; 293 bool failed_;
293 }; 294 };
294 295
295 } // namespace internal 296 } // namespace internal
296 } // namespace v8 297 } // namespace v8
297 298
298 #endif // V8_REGEXP_REGEXP_PARSER_H_ 299 #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