v8/test/mjsunit/harmony
jwolfe 1ac0965542 Allow trailing commas in function parameter lists
Add a flag harmony_trailing_commas_in_parameters that allows trailing
commas in function parameter declaration lists and function call
parameter lists. Trailing commas are allowed in parenthetical lists like
`(a, b, c,)` only if the next token is `=>`, thereby making it an arrow
function declaration. Only 1 trailing comma is allowed, not `(a,,)`. A
trailing comma must follow a non-rest parameter, so `(,)` and `(...a,)`
are still SyntaxErrors. However, a trailing comma is allowed after a
spread parameter, e.g. `a(...b,);`.

Add parser tests for all of the above.

BUG=v8:5051
LOG=y

Review-Url: https://codereview.chromium.org/2094463002
Cr-Commit-Position: refs/heads/master@{#37355}
2016-06-29 01:39:10 +00:00
..
regress Fix bug with illegal spread as single arrow parameter 2016-06-22 18:07:46 +00:00
array-concat-array-proto-getter.js
array-concat-array-proto.js
array-concat-object-proto-dict-getter.js
array-concat-object-proto-dict.js
array-concat-object-proto-generic-dict.js
array-concat-object-proto.js
async-arrow-lexical-arguments.js
async-arrow-lexical-new.target.js
async-arrow-lexical-super.js
async-arrow-lexical-this.js
async-await-basic.js [parser] don't report error for CoverInitializedNames in async arrow formals 2016-06-25 00:39:11 +00:00
async-debug-basic.js
async-debug-step-abort-at-break.js [debug] implement intuitive semantics for stepping over await call. 2016-06-03 15:31:52 +00:00
async-debug-step-continue-at-break.js [debug] implement intuitive semantics for stepping over await call. 2016-06-03 15:31:52 +00:00
async-debug-step-in-and-out.js [debug] implement intuitive semantics for stepping over await call. 2016-06-03 15:31:52 +00:00
async-debug-step-in-out-out.js [debug] implement intuitive semantics for stepping over await call. 2016-06-03 15:31:52 +00:00
async-debug-step-in.js [debug] implement intuitive semantics for stepping over await call. 2016-06-03 15:31:52 +00:00
async-debug-step-nested.js [debug] implement intuitive semantics for stepping over await call. 2016-06-03 15:31:52 +00:00
async-debug-step-next-constant.js [debug] implement intuitive semantics for stepping over await call. 2016-06-03 15:31:52 +00:00
async-debug-step-next.js [debug] implement intuitive semantics for stepping over await call. 2016-06-03 15:31:52 +00:00
async-debug-step-out.js [debug] implement intuitive semantics for stepping over await call. 2016-06-03 15:31:52 +00:00
async-function-debug-evaluate.js
async-function-debug-scopes.js [debug] implement intuitive semantics for stepping over await call. 2016-06-03 15:31:52 +00:00
async-function-stacktrace.js
atomics.js
block-lazy-compile.js
dataview-accessors.js
debug-async-break-on-stack.js [esnext] Fix various callsites to use is_resumable, not is_generator 2016-05-31 17:15:15 +00:00
debug-async-break.js [esnext] Fix various callsites to use is_resumable, not is_generator 2016-05-31 17:15:15 +00:00
debug-async-function-async-task-event.js Async/await event listener test 2016-06-10 19:15:35 +00:00
debug-async-liveedit.js [liveedit]: fail to patch if target is outside of async function on stack 2016-06-15 12:25:26 +00:00
do-expressions-control.js
do-expressions.js
exponentiation-operator.js
for-in.js
function-sent.js Fix behavior of return on yield*. 2016-06-28 07:10:54 +00:00
futex.js
generators-turbo.js Fix behavior of throw on yield*. 2016-06-28 07:46:16 +00:00
generators.js Fix behavior of throw on yield*. 2016-06-28 07:46:16 +00:00
harmony-string-pad-end.js
harmony-string-pad-start.js
mirror-async-function-promise.js [test] add FunctionMirror and PromiseMirror tests for async functions 2016-06-21 16:31:52 +00:00
mirror-async-function.js [test] add FunctionMirror and PromiseMirror tests for async functions 2016-06-21 16:31:52 +00:00
module-parsing-eval.js
modules.js
object-entries.js
object-get-own-property-descriptors.js
object-values.js
private-symbols.js
private.js
regexp-change-exec.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
regexp-lookbehind.js
regexp-named-captures.js [regexp] Experimental support for regexp named captures 2016-06-15 06:49:55 +00:00
regexp-property-binary.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
regexp-property-blocks.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
regexp-property-char-class.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
regexp-property-disabled.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
regexp-property-enumerated.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
regexp-property-exact-match.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
regexp-property-general-category.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
regexp-property-lu-ui.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
regexp-property-scripts.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
regexp-property-special.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
set-prototype-of.js
sharedarraybuffer.js
simd.js
sloppy-implicit-block-function.js
sloppy-legacy-duplicate-generators.js
sloppy-no-duplicate-async.js
sloppy-no-duplicate-generators.js
sloppy-restrictive-block-function.js
to-length.js
to-name.js
to-number.js
to-primitive.js
to-string.js
trailing-commas-length.js Allow trailing commas in function parameter lists 2016-06-29 01:39:10 +00:00