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

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

Issue 1641593002: [regexp] character class for desugaring cannot be part of RegExpText. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, JSRegExp::Flags flags); 102 RegExpBuilder(Zone* zone, JSRegExp::Flags flags);
103 void AddCharacter(uc16 character); 103 void AddCharacter(uc16 character);
104 void AddUnicodeCharacter(uc32 character); 104 void AddUnicodeCharacter(uc32 character);
105 // "Adds" an empty expression. Does nothing except consume a 105 // "Adds" an empty expression. Does nothing except consume a
106 // following quantifier 106 // following quantifier
107 void AddEmpty(); 107 void AddEmpty();
108 void AddCharacterClass(RegExpCharacterClass* cc); 108 void AddCharacterClass(RegExpCharacterClass* cc);
109 void AddCharacterClass(uc32 c); 109 void AddCharacterClassForDesugaring(uc32 c);
110 void AddAtom(RegExpTree* tree); 110 void AddAtom(RegExpTree* tree);
111 void AddTerm(RegExpTree* tree); 111 void AddTerm(RegExpTree* tree);
112 void AddAssertion(RegExpTree* tree); 112 void AddAssertion(RegExpTree* tree);
113 void NewAlternative(); // '|' 113 void NewAlternative(); // '|'
114 void AddQuantifierToAtom(int min, int max, 114 void AddQuantifierToAtom(int min, int max,
115 RegExpQuantifier::QuantifierType type); 115 RegExpQuantifier::QuantifierType type);
116 RegExpTree* ToRegExp(); 116 RegExpTree* ToRegExp();
117 117
118 private: 118 private:
119 static const uc16 kNoPendingSurrogate = 0; 119 static const uc16 kNoPendingSurrogate = 0;
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 bool simple_; 284 bool simple_;
285 bool contains_anchor_; 285 bool contains_anchor_;
286 bool is_scanned_for_captures_; 286 bool is_scanned_for_captures_;
287 bool failed_; 287 bool failed_;
288 }; 288 };
289 289
290 } // namespace internal 290 } // namespace internal
291 } // namespace v8 291 } // namespace v8
292 292
293 #endif // V8_REGEXP_REGEXP_PARSER_H_ 293 #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