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_PARSING_PARSER_H_ | 5 #ifndef V8_PARSING_PARSER_H_ |
6 #define V8_PARSING_PARSER_H_ | 6 #define V8_PARSING_PARSER_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
(...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1259 Expression* SpreadCall(Expression* function, | 1259 Expression* SpreadCall(Expression* function, |
1260 ZoneList<v8::internal::Expression*>* args, int pos); | 1260 ZoneList<v8::internal::Expression*>* args, int pos); |
1261 Expression* SpreadCallNew(Expression* function, | 1261 Expression* SpreadCallNew(Expression* function, |
1262 ZoneList<v8::internal::Expression*>* args, int pos); | 1262 ZoneList<v8::internal::Expression*>* args, int pos); |
1263 | 1263 |
1264 void SetLanguageMode(Scope* scope, LanguageMode mode); | 1264 void SetLanguageMode(Scope* scope, LanguageMode mode); |
1265 void RaiseLanguageMode(LanguageMode mode); | 1265 void RaiseLanguageMode(LanguageMode mode); |
1266 | 1266 |
1267 V8_INLINE void RewriteDestructuringAssignments(); | 1267 V8_INLINE void RewriteDestructuringAssignments(); |
1268 | 1268 |
| 1269 friend class SpreadRewriter; |
| 1270 V8_INLINE Expression* RewriteSpreads(ArrayLiteral* lit); |
| 1271 |
1269 V8_INLINE Expression* RewriteExpression(Expression* expr); | 1272 V8_INLINE Expression* RewriteExpression(Expression* expr); |
1270 V8_INLINE ObjectLiteralProperty* RewriteObjectLiteralProperty( | 1273 V8_INLINE ObjectLiteralProperty* RewriteObjectLiteralProperty( |
1271 ObjectLiteralProperty* property); | 1274 ObjectLiteralProperty* property); |
1272 | 1275 |
1273 friend class InitializerRewriter; | 1276 friend class InitializerRewriter; |
1274 void RewriteParameterInitializer(Expression* expr, Scope* scope); | 1277 void RewriteParameterInitializer(Expression* expr, Scope* scope); |
1275 | 1278 |
1276 Scanner scanner_; | 1279 Scanner scanner_; |
1277 PreParser* reusable_preparser_; | 1280 PreParser* reusable_preparser_; |
1278 Scope* original_scope_; // for ES5 function declarations in sloppy eval | 1281 Scope* original_scope_; // for ES5 function declarations in sloppy eval |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1459 | 1462 |
1460 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1463 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
1461 return parser_->ParseDoExpression(ok); | 1464 return parser_->ParseDoExpression(ok); |
1462 } | 1465 } |
1463 | 1466 |
1464 | 1467 |
1465 } // namespace internal | 1468 } // namespace internal |
1466 } // namespace v8 | 1469 } // namespace v8 |
1467 | 1470 |
1468 #endif // V8_PARSING_PARSER_H_ | 1471 #endif // V8_PARSING_PARSER_H_ |
OLD | NEW |