Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: test/cctest/test-parsing.cc

Issue 2267493002: Disallow 'await' in object literal shorthand position (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: More cleanup Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/parsing/parser-base.h ('K') | « src/parsing/token.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« src/parsing/parser-base.h ('K') | « src/parsing/token.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698