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 7842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7853 "var O = { async 0(a, a) {} }", | 7853 "var O = { async 0(a, a) {} }", |
7854 | 7854 |
7855 "async function f() { var O = { async [await](a, a) {} } }", | 7855 "async function f() { var O = { async [await](a, a) {} } }", |
7856 | 7856 |
7857 "var asyncFn = async function() { await; }", | 7857 "var asyncFn = async function() { await; }", |
7858 "async function f() { await; }", | 7858 "async function f() { await; }", |
7859 "var O = { async method() { await; } };", | 7859 "var O = { async method() { await; } };", |
7860 "var f = async() => await;", | 7860 "var f = async() => await;", |
7861 "var f = async() => { await; };", | 7861 "var f = async() => { await; };", |
7862 | 7862 |
| 7863 "async function f() { return {await} }", |
| 7864 |
7863 "var asyncFn = async function*() {}", | 7865 "var asyncFn = async function*() {}", |
7864 "async function* f() {}", | 7866 "async function* f() {}", |
7865 "var O = { *async method() {} };", | 7867 "var O = { *async method() {} };", |
7866 "var O = { async *method() {} };", | 7868 "var O = { async *method() {} };", |
7867 "var O = { async method*() {} };", | 7869 "var O = { async method*() {} };", |
7868 | 7870 |
7869 "var asyncFn = async function(x = await 1) { return x; }", | 7871 "var asyncFn = async function(x = await 1) { return x; }", |
7870 "async function f(x = await 1) { return x; }", | 7872 "async function f(x = await 1) { return x; }", |
7871 "var f = async(x = await 1) => x;", | 7873 "var f = async(x = await 1) => x;", |
7872 "var O = { async method(x = await 1) { return x; } };", | 7874 "var O = { async method(x = await 1) { return x; } };", |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8187 "(a,);", | 8189 "(a,);", |
8188 "(a,b,c,);", | 8190 "(a,b,c,);", |
8189 NULL | 8191 NULL |
8190 }; | 8192 }; |
8191 // clang-format on | 8193 // clang-format on |
8192 | 8194 |
8193 static const ParserFlag always_flags[] = {kAllowHarmonyTrailingCommas}; | 8195 static const ParserFlag always_flags[] = {kAllowHarmonyTrailingCommas}; |
8194 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, | 8196 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, |
8195 arraysize(always_flags)); | 8197 arraysize(always_flags)); |
8196 } | 8198 } |
OLD | NEW |