| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_PARSER_H_ | 5 #ifndef V8_PARSER_H_ |
| 6 #define V8_PARSER_H_ | 6 #define V8_PARSER_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/compiler.h" // For CachedDataMode | 10 #include "src/compiler.h" // For CachedDataMode |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 void FlushText(); | 200 void FlushText(); |
| 201 void FlushTerms(); | 201 void FlushTerms(); |
| 202 Zone* zone() const { return zone_; } | 202 Zone* zone() const { return zone_; } |
| 203 | 203 |
| 204 Zone* zone_; | 204 Zone* zone_; |
| 205 bool pending_empty_; | 205 bool pending_empty_; |
| 206 ZoneList<uc16>* characters_; | 206 ZoneList<uc16>* characters_; |
| 207 BufferedZoneList<RegExpTree, 2> terms_; | 207 BufferedZoneList<RegExpTree, 2> terms_; |
| 208 BufferedZoneList<RegExpTree, 2> text_; | 208 BufferedZoneList<RegExpTree, 2> text_; |
| 209 BufferedZoneList<RegExpTree, 2> alternatives_; | 209 BufferedZoneList<RegExpTree, 2> alternatives_; |
| 210 #ifdef DEBUG | 210 #if DCHECK_IS_ON |
| 211 enum {ADD_NONE, ADD_CHAR, ADD_TERM, ADD_ASSERT, ADD_ATOM} last_added_; | 211 enum {ADD_NONE, ADD_CHAR, ADD_TERM, ADD_ASSERT, ADD_ATOM} last_added_; |
| 212 #define LAST(x) last_added_ = x; | 212 #define LAST(x) last_added_ = x; |
| 213 #else | 213 #else |
| 214 #define LAST(x) | 214 #define LAST(x) |
| 215 #endif | 215 #endif |
| 216 }; | 216 }; |
| 217 | 217 |
| 218 | 218 |
| 219 class RegExpParser BASE_EMBEDDED { | 219 class RegExpParser BASE_EMBEDDED { |
| 220 public: | 220 public: |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 998 } | 998 } |
| 999 | 999 |
| 1000 | 1000 |
| 1001 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state, | 1001 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state, |
| 1002 int start, Expression* tag) { | 1002 int start, Expression* tag) { |
| 1003 return parser_->CloseTemplateLiteral(state, start, tag); | 1003 return parser_->CloseTemplateLiteral(state, start, tag); |
| 1004 } | 1004 } |
| 1005 } } // namespace v8::internal | 1005 } } // namespace v8::internal |
| 1006 | 1006 |
| 1007 #endif // V8_PARSER_H_ | 1007 #endif // V8_PARSER_H_ |
| OLD | NEW |