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]() { } }", | |
Dan Ehrenberg
2016/05/04 22:36:34
Could you add a test which requires deeper recursi
adamk
2016/05/04 22:40:39
Done.
| |
6784 NULL | 6786 NULL |
6785 }; | 6787 }; |
6786 // clang-format on | 6788 // clang-format on |
6787 | 6789 |
6788 RunParserSyncTest(sloppy_function_context_data, parameter_data, kSuccess); | 6790 RunParserSyncTest(sloppy_function_context_data, parameter_data, kSuccess); |
6789 RunParserSyncTest(sloppy_arrow_context_data, parameter_data, kSuccess); | 6791 RunParserSyncTest(sloppy_arrow_context_data, parameter_data, kSuccess); |
6790 | 6792 |
6791 RunParserSyncTest(strict_function_context_data, parameter_data, kError); | 6793 RunParserSyncTest(strict_function_context_data, parameter_data, kError); |
6792 RunParserSyncTest(strict_arrow_context_data, parameter_data, kError); | 6794 RunParserSyncTest(strict_arrow_context_data, parameter_data, kError); |
6793 | 6795 |
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7453 "for (const x = 0 in {});", | 7455 "for (const x = 0 in {});", |
7454 "for (let x = 0 in {});", | 7456 "for (let x = 0 in {});", |
7455 NULL | 7457 NULL |
7456 }; | 7458 }; |
7457 // clang-format on | 7459 // clang-format on |
7458 | 7460 |
7459 static const ParserFlag always_flags[] = {kAllowHarmonyForIn}; | 7461 static const ParserFlag always_flags[] = {kAllowHarmonyForIn}; |
7460 RunParserSyncTest(context_data, error_data, kError, nullptr, 0, always_flags, | 7462 RunParserSyncTest(context_data, error_data, kError, nullptr, 0, always_flags, |
7461 arraysize(always_flags)); | 7463 arraysize(always_flags)); |
7462 } | 7464 } |
OLD | NEW |