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 4460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4471 const char* class_data[] = { | 4471 const char* class_data[] = { |
4472 "class", | 4472 "class", |
4473 "class name", | 4473 "class name", |
4474 "class name extends", | 4474 "class name extends", |
4475 "class extends", | 4475 "class extends", |
4476 "class {", | 4476 "class {", |
4477 "class { m }", | 4477 "class { m }", |
4478 "class { m; n }", | 4478 "class { m; n }", |
4479 "class { m: 1 }", | 4479 "class { m: 1 }", |
4480 "class { m(); n() }", | 4480 "class { m(); n() }", |
| 4481 "class { *(){} }", |
| 4482 "class { get *(){} }", |
| 4483 "class { static *(){} }", |
4481 "class { get m }", | 4484 "class { get m }", |
4482 "class { get m() }", | 4485 "class { get m() }", |
4483 "class { get m() { }", | 4486 "class { get m() { }", |
4484 "class { set m() {} }", // Missing required parameter. | 4487 "class { set m() {} }", // Missing required parameter. |
4485 "class { m() {}, n() {} }", // No commas allowed. | 4488 "class { m() {}, n() {} }", // No commas allowed. |
4486 NULL}; | 4489 NULL}; |
4487 | 4490 |
4488 RunParserSyncTest(context_data, class_data, kError); | 4491 RunParserSyncTest(context_data, class_data, kError); |
4489 } | 4492 } |
4490 | 4493 |
(...skipping 3689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8180 "(a,);", | 8183 "(a,);", |
8181 "(a,b,c,);", | 8184 "(a,b,c,);", |
8182 NULL | 8185 NULL |
8183 }; | 8186 }; |
8184 // clang-format on | 8187 // clang-format on |
8185 | 8188 |
8186 static const ParserFlag always_flags[] = {kAllowHarmonyTrailingCommas}; | 8189 static const ParserFlag always_flags[] = {kAllowHarmonyTrailingCommas}; |
8187 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, | 8190 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, |
8188 arraysize(always_flags)); | 8191 arraysize(always_flags)); |
8189 } | 8192 } |
OLD | NEW |