| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 #include <cmath> | 5 #include <cmath> |
| 6 | 6 |
| 7 #include "src/allocation.h" | 7 #include "src/allocation.h" |
| 8 #include "src/base/logging.h" | 8 #include "src/base/logging.h" |
| 9 #include "src/conversions-inl.h" | 9 #include "src/conversions-inl.h" |
| 10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
| (...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1286 // do '{' StatementList '}' | 1286 // do '{' StatementList '}' |
| 1287 Expect(Token::DO, CHECK_OK); | 1287 Expect(Token::DO, CHECK_OK); |
| 1288 Expect(Token::LBRACE, CHECK_OK); | 1288 Expect(Token::LBRACE, CHECK_OK); |
| 1289 while (peek() != Token::RBRACE) { | 1289 while (peek() != Token::RBRACE) { |
| 1290 ParseStatementListItem(CHECK_OK); | 1290 ParseStatementListItem(CHECK_OK); |
| 1291 } | 1291 } |
| 1292 Expect(Token::RBRACE, CHECK_OK); | 1292 Expect(Token::RBRACE, CHECK_OK); |
| 1293 return PreParserExpression::Default(); | 1293 return PreParserExpression::Default(); |
| 1294 } | 1294 } |
| 1295 | 1295 |
| 1296 void PreParserTraits::ParseAsyncArrowSingleExpressionBody( |
| 1297 PreParserStatementList body, bool accept_IN, |
| 1298 Type::ExpressionClassifier* classifier, int pos, bool* ok) { |
| 1299 Scope* scope = pre_parser_->scope_; |
| 1300 scope->ForceContextAllocation(); |
| 1301 |
| 1302 PreParserExpression return_value = |
| 1303 pre_parser_->ParseAssignmentExpression(accept_IN, classifier, ok); |
| 1304 if (!*ok) return; |
| 1305 |
| 1306 body->Add(PreParserStatement::ExpressionStatement(return_value), zone()); |
| 1307 } |
| 1308 |
| 1296 #undef CHECK_OK | 1309 #undef CHECK_OK |
| 1297 | 1310 |
| 1298 | 1311 |
| 1299 } // namespace internal | 1312 } // namespace internal |
| 1300 } // namespace v8 | 1313 } // namespace v8 |
| OLD | NEW |