OLD | NEW |
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 // Parses and returns a single escaped character. The character | 168 // Parses and returns a single escaped character. The character |
169 // must not be 'b' or 'B' since they are usually handle specially. | 169 // must not be 'b' or 'B' since they are usually handle specially. |
170 uc32 ParseClassCharacterEscape(); | 170 uc32 ParseClassCharacterEscape(); |
171 | 171 |
172 // Checks whether the following is a length-digit hexadecimal number, | 172 // Checks whether the following is a length-digit hexadecimal number, |
173 // and sets the value if it is. | 173 // and sets the value if it is. |
174 bool ParseHexEscape(int length, uc32* value); | 174 bool ParseHexEscape(int length, uc32* value); |
175 bool ParseUnicodeEscape(uc32* value); | 175 bool ParseUnicodeEscape(uc32* value); |
176 bool ParseUnlimitedLengthHexNumber(int max_value, uc32* value); | 176 bool ParseUnlimitedLengthHexNumber(int max_value, uc32* value); |
177 bool ParsePropertyClass(ZoneList<CharacterRange>* result); | 177 bool ParsePropertyClass(ZoneList<CharacterRange>* result, bool negate); |
178 | 178 |
179 uc32 ParseOctalLiteral(); | 179 uc32 ParseOctalLiteral(); |
180 | 180 |
181 // Tries to parse the input as a back reference. If successful it | 181 // Tries to parse the input as a back reference. If successful it |
182 // stores the result in the output parameter and returns true. If | 182 // stores the result in the output parameter and returns true. If |
183 // it fails it will push back the characters read so the same characters | 183 // it fails it will push back the characters read so the same characters |
184 // can be reparsed. | 184 // can be reparsed. |
185 bool ParseBackReferenceIndex(int* index_out); | 185 bool ParseBackReferenceIndex(int* index_out); |
186 | 186 |
187 bool ParseClassProperty(ZoneList<CharacterRange>* result); | 187 bool ParseClassProperty(ZoneList<CharacterRange>* result); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 bool simple_; | 291 bool simple_; |
292 bool contains_anchor_; | 292 bool contains_anchor_; |
293 bool is_scanned_for_captures_; | 293 bool is_scanned_for_captures_; |
294 bool failed_; | 294 bool failed_; |
295 }; | 295 }; |
296 | 296 |
297 } // namespace internal | 297 } // namespace internal |
298 } // namespace v8 | 298 } // namespace v8 |
299 | 299 |
300 #endif // V8_REGEXP_REGEXP_PARSER_H_ | 300 #endif // V8_REGEXP_REGEXP_PARSER_H_ |
OLD | NEW |