• jwolfe's avatar
    Allow trailing commas in function parameter lists · 1ac09655
    jwolfe authored
    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}
    1ac09655
Name
Last commit
Last update
..
regress Loading commit data...
array-concat-array-proto-getter.js Loading commit data...
array-concat-array-proto.js Loading commit data...
array-concat-object-proto-dict-getter.js Loading commit data...
array-concat-object-proto-dict.js Loading commit data...
array-concat-object-proto-generic-dict.js Loading commit data...
array-concat-object-proto.js Loading commit data...
async-arrow-lexical-arguments.js Loading commit data...
async-arrow-lexical-new.target.js Loading commit data...
async-arrow-lexical-super.js Loading commit data...
async-arrow-lexical-this.js Loading commit data...
async-await-basic.js Loading commit data...
async-debug-basic.js Loading commit data...
async-debug-step-abort-at-break.js Loading commit data...
async-debug-step-continue-at-break.js Loading commit data...
async-debug-step-in-and-out.js Loading commit data...
async-debug-step-in-out-out.js Loading commit data...
async-debug-step-in.js Loading commit data...
async-debug-step-nested.js Loading commit data...
async-debug-step-next-constant.js Loading commit data...
async-debug-step-next.js Loading commit data...
async-debug-step-out.js Loading commit data...
async-function-debug-evaluate.js Loading commit data...
async-function-debug-scopes.js Loading commit data...
async-function-stacktrace.js Loading commit data...
atomics.js Loading commit data...
block-lazy-compile.js Loading commit data...
dataview-accessors.js Loading commit data...
debug-async-break-on-stack.js Loading commit data...
debug-async-break.js Loading commit data...
debug-async-function-async-task-event.js Loading commit data...
debug-async-liveedit.js Loading commit data...
do-expressions-control.js Loading commit data...
do-expressions.js Loading commit data...
exponentiation-operator.js Loading commit data...
for-in.js Loading commit data...
function-sent.js Loading commit data...
futex.js Loading commit data...
generators-turbo.js Loading commit data...
generators.js Loading commit data...
harmony-string-pad-end.js Loading commit data...
harmony-string-pad-start.js Loading commit data...
mirror-async-function-promise.js Loading commit data...
mirror-async-function.js Loading commit data...
module-parsing-eval.js Loading commit data...
modules.js Loading commit data...
object-entries.js Loading commit data...
object-get-own-property-descriptors.js Loading commit data...
object-values.js Loading commit data...
private-symbols.js Loading commit data...
private.js Loading commit data...
regexp-change-exec.js Loading commit data...
regexp-lookbehind.js Loading commit data...
regexp-named-captures.js Loading commit data...
regexp-property-binary.js Loading commit data...
regexp-property-blocks.js Loading commit data...
regexp-property-char-class.js Loading commit data...
regexp-property-disabled.js Loading commit data...
regexp-property-enumerated.js Loading commit data...
regexp-property-exact-match.js Loading commit data...
regexp-property-general-category.js Loading commit data...
regexp-property-lu-ui.js Loading commit data...
regexp-property-scripts.js Loading commit data...
regexp-property-special.js Loading commit data...
set-prototype-of.js Loading commit data...
sharedarraybuffer.js Loading commit data...
simd.js Loading commit data...
sloppy-implicit-block-function.js Loading commit data...
sloppy-legacy-duplicate-generators.js Loading commit data...
sloppy-no-duplicate-async.js Loading commit data...
sloppy-no-duplicate-generators.js Loading commit data...
sloppy-restrictive-block-function.js Loading commit data...
to-length.js Loading commit data...
to-name.js Loading commit data...
to-number.js Loading commit data...
to-primitive.js Loading commit data...
to-string.js Loading commit data...
trailing-commas-length.js Loading commit data...