| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 6763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6774 | 6774 |
| 6775 // Because classes are always in strict mode, these are always errors. | 6775 // Because classes are always in strict mode, these are always errors. |
| 6776 const char* always_error_param_data[] = { | 6776 const char* always_error_param_data[] = { |
| 6777 "x = class extends (yield) { }", | 6777 "x = class extends (yield) { }", |
| 6778 "x = class extends f(yield) { }", | 6778 "x = class extends f(yield) { }", |
| 6779 "x = class extends (null, yield) { }", | 6779 "x = class extends (null, yield) { }", |
| 6780 "x = class extends (a ? null : yield) { }", | 6780 "x = class extends (a ? null : yield) { }", |
| 6781 "[x] = [class extends (a ? null : yield) { }]", | 6781 "[x] = [class extends (a ? null : yield) { }]", |
| 6782 "[x = class extends (a ? null : yield) { }]", | 6782 "[x = class extends (a ? null : yield) { }]", |
| 6783 "[x = class extends (a ? null : yield) { }] = [null]", | 6783 "[x = class extends (a ? null : yield) { }] = [null]", |
| 6784 "x = class { [yield]() { } }", |
| 6785 "x = class { static [yield]() { } }", |
| 6786 "x = class { [(yield, 1)]() { } }", |
| 6787 "x = class { [y = (yield, 1)]() { } }", |
| 6784 NULL | 6788 NULL |
| 6785 }; | 6789 }; |
| 6786 // clang-format on | 6790 // clang-format on |
| 6787 | 6791 |
| 6788 RunParserSyncTest(sloppy_function_context_data, parameter_data, kSuccess); | 6792 RunParserSyncTest(sloppy_function_context_data, parameter_data, kSuccess); |
| 6789 RunParserSyncTest(sloppy_arrow_context_data, parameter_data, kSuccess); | 6793 RunParserSyncTest(sloppy_arrow_context_data, parameter_data, kSuccess); |
| 6790 | 6794 |
| 6791 RunParserSyncTest(strict_function_context_data, parameter_data, kError); | 6795 RunParserSyncTest(strict_function_context_data, parameter_data, kError); |
| 6792 RunParserSyncTest(strict_arrow_context_data, parameter_data, kError); | 6796 RunParserSyncTest(strict_arrow_context_data, parameter_data, kError); |
| 6793 | 6797 |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7453 "for (const x = 0 in {});", | 7457 "for (const x = 0 in {});", |
| 7454 "for (let x = 0 in {});", | 7458 "for (let x = 0 in {});", |
| 7455 NULL | 7459 NULL |
| 7456 }; | 7460 }; |
| 7457 // clang-format on | 7461 // clang-format on |
| 7458 | 7462 |
| 7459 static const ParserFlag always_flags[] = {kAllowHarmonyForIn}; | 7463 static const ParserFlag always_flags[] = {kAllowHarmonyForIn}; |
| 7460 RunParserSyncTest(context_data, error_data, kError, nullptr, 0, always_flags, | 7464 RunParserSyncTest(context_data, error_data, kError, nullptr, 0, always_flags, |
| 7461 arraysize(always_flags)); | 7465 arraysize(always_flags)); |
| 7462 } | 7466 } |
| OLD | NEW |