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 7692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7703 "var f = async({ await } = {}) => 1;", | 7703 "var f = async({ await } = {}) => 1;", |
7704 "var f = async({ await = 1 } = {}) => 1;", | 7704 "var f = async({ await = 1 } = {}) => 1;", |
7705 "var f = async([await]) => 1;", | 7705 "var f = async([await]) => 1;", |
7706 "var f = async([await] = []) => 1;", | 7706 "var f = async([await] = []) => 1;", |
7707 "var f = async([await = 1]) => 1;", | 7707 "var f = async([await = 1]) => 1;", |
7708 "var f = async([await = 1] = []) => 1;", | 7708 "var f = async([await = 1] = []) => 1;", |
7709 "var f = async(...await) => 1;", | 7709 "var f = async(...await) => 1;", |
7710 "var f = async(await) => 1;", | 7710 "var f = async(await) => 1;", |
7711 "var f = async(await = 1) => 1;", | 7711 "var f = async(await = 1) => 1;", |
7712 "var f = async(...[await]) => 1;", | 7712 "var f = async(...[await]) => 1;", |
| 7713 |
| 7714 // v8:5190 |
| 7715 "var f = async(1) => 1", |
| 7716 "var f = async('str') => 1", |
| 7717 "var f = async(/foo/) => 1", |
| 7718 "var f = async({ foo = async(1) => 1 }) => 1", |
| 7719 "var f = async({ foo = async(a) => 1 })", |
| 7720 |
7713 NULL | 7721 NULL |
7714 }; | 7722 }; |
7715 // clang-format on | 7723 // clang-format on |
7716 | 7724 |
7717 static const ParserFlag always_flags[] = {kAllowHarmonyAsyncAwait}; | 7725 static const ParserFlag always_flags[] = {kAllowHarmonyAsyncAwait}; |
7718 RunParserSyncTest(context_data, error_data, kError, NULL, 0, always_flags, | 7726 RunParserSyncTest(context_data, error_data, kError, NULL, 0, always_flags, |
7719 arraysize(always_flags)); | 7727 arraysize(always_flags)); |
7720 RunParserSyncTest(strict_context_data, strict_error_data, kError, NULL, 0, | 7728 RunParserSyncTest(strict_context_data, strict_error_data, kError, NULL, 0, |
7721 always_flags, arraysize(always_flags)); | 7729 always_flags, arraysize(always_flags)); |
7722 | 7730 |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7940 "(a,);", | 7948 "(a,);", |
7941 "(a,b,c,);", | 7949 "(a,b,c,);", |
7942 NULL | 7950 NULL |
7943 }; | 7951 }; |
7944 // clang-format on | 7952 // clang-format on |
7945 | 7953 |
7946 static const ParserFlag always_flags[] = {kAllowHarmonyTrailingCommas}; | 7954 static const ParserFlag always_flags[] = {kAllowHarmonyTrailingCommas}; |
7947 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, | 7955 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, |
7948 arraysize(always_flags)); | 7956 arraysize(always_flags)); |
7949 } | 7957 } |
OLD | NEW |