| 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 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1209 #undef FORWARD_DECLARE | 1209 #undef FORWARD_DECLARE |
| 1210 | 1210 |
| 1211 | 1211 |
| 1212 class RegExpTree: public ZoneObject { | 1212 class RegExpTree: public ZoneObject { |
| 1213 public: | 1213 public: |
| 1214 virtual ~RegExpTree() { } | 1214 virtual ~RegExpTree() { } |
| 1215 virtual void* Accept(RegExpVisitor* visitor, void* data) = 0; | 1215 virtual void* Accept(RegExpVisitor* visitor, void* data) = 0; |
| 1216 virtual RegExpNode* ToNode(RegExpCompiler* compiler, | 1216 virtual RegExpNode* ToNode(RegExpCompiler* compiler, |
| 1217 RegExpNode* on_success, | 1217 RegExpNode* on_success, |
| 1218 RegExpNode* on_failure) = 0; | 1218 RegExpNode* on_failure) = 0; |
| 1219 SmartPointer<char> ToString(); | 1219 SmartPointer<const char> ToString(); |
| 1220 #define MAKE_ASTYPE(Name) virtual RegExp##Name* As##Name(); | 1220 #define MAKE_ASTYPE(Name) virtual RegExp##Name* As##Name(); |
| 1221 FOR_EACH_REG_EXP_NODE_TYPE(MAKE_ASTYPE) | 1221 FOR_EACH_REG_EXP_NODE_TYPE(MAKE_ASTYPE) |
| 1222 #undef MAKE_ASTYPE | 1222 #undef MAKE_ASTYPE |
| 1223 }; | 1223 }; |
| 1224 | 1224 |
| 1225 | 1225 |
| 1226 class RegExpDisjunction: public RegExpTree { | 1226 class RegExpDisjunction: public RegExpTree { |
| 1227 public: | 1227 public: |
| 1228 explicit RegExpDisjunction(ZoneList<RegExpTree*>* nodes) : nodes_(nodes) { } | 1228 explicit RegExpDisjunction(ZoneList<RegExpTree*>* nodes) : nodes_(nodes) { } |
| 1229 virtual void* Accept(RegExpVisitor* visitor, void* data); | 1229 virtual void* Accept(RegExpVisitor* visitor, void* data); |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1441 #undef DEF_VISIT | 1441 #undef DEF_VISIT |
| 1442 | 1442 |
| 1443 private: | 1443 private: |
| 1444 bool stack_overflow_; | 1444 bool stack_overflow_; |
| 1445 }; | 1445 }; |
| 1446 | 1446 |
| 1447 | 1447 |
| 1448 } } // namespace v8::internal | 1448 } } // namespace v8::internal |
| 1449 | 1449 |
| 1450 #endif // V8_AST_H_ | 1450 #endif // V8_AST_H_ |
| OLD | NEW |