| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1358 static const int kInfinity = (1 << 30); | 1358 static const int kInfinity = (1 << 30); |
| 1359 private: | 1359 private: |
| 1360 int min_; | 1360 int min_; |
| 1361 int max_; | 1361 int max_; |
| 1362 bool is_greedy_; | 1362 bool is_greedy_; |
| 1363 RegExpTree* body_; | 1363 RegExpTree* body_; |
| 1364 }; | 1364 }; |
| 1365 | 1365 |
| 1366 | 1366 |
| 1367 enum CaptureAvailability { | 1367 enum CaptureAvailability { |
| 1368 CAPTURE_AVAILABLE, CAPTURE_UNREACHABLE, CAPTURE_PERMANENTLY_UNREACHABLE }; | 1368 CAPTURE_AVAILABLE, |
| 1369 CAPTURE_UNREACHABLE, |
| 1370 CAPTURE_PERMANENTLY_UNREACHABLE |
| 1371 }; |
| 1369 | 1372 |
| 1370 class RegExpCapture: public RegExpTree { | 1373 class RegExpCapture: public RegExpTree { |
| 1371 public: | 1374 public: |
| 1372 explicit RegExpCapture(RegExpTree* body, int index) | 1375 explicit RegExpCapture(RegExpTree* body, int index) |
| 1373 : body_(body), index_(index), available_(CAPTURE_AVAILABLE) { } | 1376 : body_(body), index_(index), available_(CAPTURE_AVAILABLE) { } |
| 1374 virtual void* Accept(RegExpVisitor* visitor, void* data); | 1377 virtual void* Accept(RegExpVisitor* visitor, void* data); |
| 1375 virtual RegExpNode* ToNode(RegExpCompiler* compiler, | 1378 virtual RegExpNode* ToNode(RegExpCompiler* compiler, |
| 1376 RegExpNode* on_success, | 1379 RegExpNode* on_success, |
| 1377 RegExpNode* on_failure); | 1380 RegExpNode* on_failure); |
| 1378 static RegExpNode* ToNode(RegExpTree* body, | 1381 static RegExpNode* ToNode(RegExpTree* body, |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1496 #undef DEF_VISIT | 1499 #undef DEF_VISIT |
| 1497 | 1500 |
| 1498 private: | 1501 private: |
| 1499 bool stack_overflow_; | 1502 bool stack_overflow_; |
| 1500 }; | 1503 }; |
| 1501 | 1504 |
| 1502 | 1505 |
| 1503 } } // namespace v8::internal | 1506 } } // namespace v8::internal |
| 1504 | 1507 |
| 1505 #endif // V8_AST_H_ | 1508 #endif // V8_AST_H_ |
| OLD | NEW |