| 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_AST_H_ | 5 #ifndef V8_REGEXP_REGEXP_AST_H_ |
| 6 #define V8_REGEXP_REGEXP_AST_H_ | 6 #define V8_REGEXP_REGEXP_AST_H_ |
| 7 | 7 |
| 8 #include "src/objects.h" | 8 #include "src/objects.h" |
| 9 #include "src/utils.h" | 9 #include "src/utils.h" |
| 10 #include "src/zone.h" | 10 #include "src/zone.h" |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 class RegExpCharacterClass final : public RegExpTree { | 286 class RegExpCharacterClass final : public RegExpTree { |
| 287 public: | 287 public: |
| 288 RegExpCharacterClass(ZoneList<CharacterRange>* ranges, bool is_negated) | 288 RegExpCharacterClass(ZoneList<CharacterRange>* ranges, bool is_negated) |
| 289 : set_(ranges), is_negated_(is_negated) {} | 289 : set_(ranges), is_negated_(is_negated) {} |
| 290 explicit RegExpCharacterClass(uc16 type) : set_(type), is_negated_(false) {} | 290 explicit RegExpCharacterClass(uc16 type) : set_(type), is_negated_(false) {} |
| 291 void* Accept(RegExpVisitor* visitor, void* data) override; | 291 void* Accept(RegExpVisitor* visitor, void* data) override; |
| 292 RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success) override; | 292 RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success) override; |
| 293 RegExpCharacterClass* AsCharacterClass() override; | 293 RegExpCharacterClass* AsCharacterClass() override; |
| 294 bool IsCharacterClass() override; | 294 bool IsCharacterClass() override; |
| 295 bool IsTextElement() override { return true; } | 295 bool IsTextElement() override { return true; } |
| 296 bool NeedsDesugaringForUnicode(Zone* zone); | |
| 297 int min_match() override { return 1; } | 296 int min_match() override { return 1; } |
| 298 int max_match() override { return 1; } | 297 int max_match() override { return 1; } |
| 299 void AppendToText(RegExpText* text, Zone* zone) override; | 298 void AppendToText(RegExpText* text, Zone* zone) override; |
| 300 CharacterSet character_set() { return set_; } | 299 CharacterSet character_set() { return set_; } |
| 301 // TODO(lrn): Remove need for complex version if is_standard that | 300 // TODO(lrn): Remove need for complex version if is_standard that |
| 302 // recognizes a mangled standard set and just do { return set_.is_special(); } | 301 // recognizes a mangled standard set and just do { return set_.is_special(); } |
| 303 bool is_standard(Zone* zone); | 302 bool is_standard(Zone* zone); |
| 304 // Returns a value representing the standard character set if is_standard() | 303 // Returns a value representing the standard character set if is_standard() |
| 305 // returns true. | 304 // returns true. |
| 306 // Currently used values are: | 305 // Currently used values are: |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 RegExpEmpty* AsEmpty() override; | 509 RegExpEmpty* AsEmpty() override; |
| 511 bool IsEmpty() override; | 510 bool IsEmpty() override; |
| 512 int min_match() override { return 0; } | 511 int min_match() override { return 0; } |
| 513 int max_match() override { return 0; } | 512 int max_match() override { return 0; } |
| 514 }; | 513 }; |
| 515 | 514 |
| 516 } // namespace internal | 515 } // namespace internal |
| 517 } // namespace v8 | 516 } // namespace v8 |
| 518 | 517 |
| 519 #endif // V8_REGEXP_REGEXP_AST_H_ | 518 #endif // V8_REGEXP_REGEXP_AST_H_ |
| OLD | NEW |