| 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/zone-containers.h" | 10 #include "src/zone/zone-containers.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 182 |
| 183 private: | 183 private: |
| 184 TextElement(TextType text_type, RegExpTree* tree) | 184 TextElement(TextType text_type, RegExpTree* tree) |
| 185 : cp_offset_(-1), text_type_(text_type), tree_(tree) {} | 185 : cp_offset_(-1), text_type_(text_type), tree_(tree) {} |
| 186 | 186 |
| 187 int cp_offset_; | 187 int cp_offset_; |
| 188 TextType text_type_; | 188 TextType text_type_; |
| 189 RegExpTree* tree_; | 189 RegExpTree* tree_; |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 | |
| 193 class RegExpTree : public ZoneObject { | 192 class RegExpTree : public ZoneObject { |
| 194 public: | 193 public: |
| 195 static const int kInfinity = kMaxInt; | 194 static const int kInfinity = kMaxInt; |
| 196 virtual ~RegExpTree() {} | 195 virtual ~RegExpTree() {} |
| 197 virtual void* Accept(RegExpVisitor* visitor, void* data) = 0; | 196 virtual void* Accept(RegExpVisitor* visitor, void* data) = 0; |
| 198 virtual RegExpNode* ToNode(RegExpCompiler* compiler, | 197 virtual RegExpNode* ToNode(RegExpCompiler* compiler, |
| 199 RegExpNode* on_success) = 0; | 198 RegExpNode* on_success) = 0; |
| 200 virtual bool IsTextElement() { return false; } | 199 virtual bool IsTextElement() { return false; } |
| 201 virtual bool IsAnchoredAtStart() { return false; } | 200 virtual bool IsAnchoredAtStart() { return false; } |
| 202 virtual bool IsAnchoredAtEnd() { return false; } | 201 virtual bool IsAnchoredAtEnd() { return false; } |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 RegExpEmpty* AsEmpty() override; | 524 RegExpEmpty* AsEmpty() override; |
| 526 bool IsEmpty() override; | 525 bool IsEmpty() override; |
| 527 int min_match() override { return 0; } | 526 int min_match() override { return 0; } |
| 528 int max_match() override { return 0; } | 527 int max_match() override { return 0; } |
| 529 }; | 528 }; |
| 530 | 529 |
| 531 } // namespace internal | 530 } // namespace internal |
| 532 } // namespace v8 | 531 } // namespace v8 |
| 533 | 532 |
| 534 #endif // V8_REGEXP_REGEXP_AST_H_ | 533 #endif // V8_REGEXP_REGEXP_AST_H_ |
| OLD | NEW |