| 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 6431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6442 "a <<< a", | 6442 "a <<< a", |
| 6443 "a >>> a", | 6443 "a >>> a", |
| 6444 "function a() {}", | 6444 "function a() {}", |
| 6445 "a`bcd`", | 6445 "a`bcd`", |
| 6446 "this", | 6446 "this", |
| 6447 "null", | 6447 "null", |
| 6448 "true", | 6448 "true", |
| 6449 "false", | 6449 "false", |
| 6450 "1", | 6450 "1", |
| 6451 "'abc'", | 6451 "'abc'", |
| 6452 "/abc/", |
| 6453 "`abc`", |
| 6452 "class {}", | 6454 "class {}", |
| 6453 "{+2 : x}", | 6455 "{+2 : x}", |
| 6454 "{-2 : x}", | 6456 "{-2 : x}", |
| 6455 "var", | 6457 "var", |
| 6456 "[var]", | 6458 "[var]", |
| 6457 "{x : {y : var}}", | 6459 "{x : {y : var}}", |
| 6458 "{x : x = a+}", | 6460 "{x : x = a+}", |
| 6459 "{x : x = (a+)}", | 6461 "{x : x = (a+)}", |
| 6460 "{x : x += a}", | 6462 "{x : x += a}", |
| 6461 "{m() {} = 0}", | 6463 "{m() {} = 0}", |
| 6462 "{[1+1]}", | 6464 "{[1+1]}", |
| 6463 "[...rest, x]", | 6465 "[...rest, x]", |
| 6464 "[a,b,...rest, x]", | 6466 "[a,b,...rest, x]", |
| 6465 "[a,,...rest, x]", | 6467 "[a,,...rest, x]", |
| 6466 "[...rest,]", | 6468 "[...rest,]", |
| 6467 "[a,b,...rest,]", | 6469 "[a,b,...rest,]", |
| 6468 "[a,,...rest,]", | 6470 "[a,,...rest,]", |
| 6469 "[...rest,...rest1]", | 6471 "[...rest,...rest1]", |
| 6470 "[a,b,...rest,...rest1]", | 6472 "[a,b,...rest,...rest1]", |
| 6471 "[a,,..rest,...rest1]", | 6473 "[a,,..rest,...rest1]", |
| 6474 "{ x : 3 }", |
| 6475 "{ x : 'foo' }", |
| 6476 "{ x : /foo/ }", |
| 6477 "{ x : `foo` }", |
| 6472 NULL}; | 6478 NULL}; |
| 6473 // clang-format on | 6479 // clang-format on |
| 6474 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, | 6480 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, |
| 6475 arraysize(always_flags)); | 6481 arraysize(always_flags)); |
| 6476 } | 6482 } |
| 6477 | 6483 |
| 6478 { // All modes. | 6484 { // All modes. |
| 6479 const char* context_data[][2] = {{"'use strict'; let ", " = {};"}, | 6485 const char* context_data[][2] = {{"'use strict'; let ", " = {};"}, |
| 6480 {"var ", " = {};"}, | 6486 {"var ", " = {};"}, |
| 6481 {"'use strict'; const ", " = {};"}, | 6487 {"'use strict'; const ", " = {};"}, |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6832 "for (let x in {}) {}", | 6838 "for (let x in {}) {}", |
| 6833 "for (let x of []) {}", | 6839 "for (let x of []) {}", |
| 6834 NULL | 6840 NULL |
| 6835 }; | 6841 }; |
| 6836 // clang-format on | 6842 // clang-format on |
| 6837 | 6843 |
| 6838 static const ParserFlag always_flags[] = {kAllowHarmonySloppy}; | 6844 static const ParserFlag always_flags[] = {kAllowHarmonySloppy}; |
| 6839 RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags, | 6845 RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags, |
| 6840 arraysize(always_flags)); | 6846 arraysize(always_flags)); |
| 6841 } | 6847 } |
| OLD | NEW |