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 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
622 // Identifier ':' Statement | 622 // Identifier ':' Statement |
623 | 623 |
624 switch (peek()) { | 624 switch (peek()) { |
625 case Token::FUNCTION: | 625 case Token::FUNCTION: |
626 case Token::LBRACE: | 626 case Token::LBRACE: |
627 UNREACHABLE(); // Always handled by the callers. | 627 UNREACHABLE(); // Always handled by the callers. |
628 case Token::CLASS: | 628 case Token::CLASS: |
629 ReportUnexpectedToken(Next()); | 629 ReportUnexpectedToken(Next()); |
630 *ok = false; | 630 *ok = false; |
631 return Statement::Default(); | 631 return Statement::Default(); |
632 | |
adamk
2016/06/06 20:51:02
Looks like you've got a spurious whitespace change
nickie
2016/06/08 11:38:46
Reverting it.
| |
633 default: | 632 default: |
634 break; | 633 break; |
635 } | 634 } |
636 | 635 |
637 bool starts_with_identifier = peek_any_identifier(); | 636 bool starts_with_identifier = peek_any_identifier(); |
638 ExpressionClassifier classifier(this); | 637 ExpressionClassifier classifier(this); |
639 Expression expr = ParseExpression(true, &classifier, CHECK_OK); | 638 Expression expr = ParseExpression(true, &classifier, CHECK_OK); |
640 ValidateExpression(&classifier, CHECK_OK); | 639 ValidateExpression(&classifier, CHECK_OK); |
641 | 640 |
642 // Even if the expression starts with an identifier, it is not necessarily an | 641 // Even if the expression starts with an identifier, it is not necessarily an |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1307 if (!*ok) return; | 1306 if (!*ok) return; |
1308 | 1307 |
1309 body->Add(PreParserStatement::ExpressionStatement(return_value), zone()); | 1308 body->Add(PreParserStatement::ExpressionStatement(return_value), zone()); |
1310 } | 1309 } |
1311 | 1310 |
1312 #undef CHECK_OK | 1311 #undef CHECK_OK |
1313 | 1312 |
1314 | 1313 |
1315 } // namespace internal | 1314 } // namespace internal |
1316 } // namespace v8 | 1315 } // namespace v8 |
OLD | NEW |