1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 22:35:07 +00:00
serenity/Libraries/LibJS/Tests/functions
Linus Groh 965d952ff3 LibJS: Share parameter parsing between regular and arrow functions
This simplifies try_parse_arrow_function_expression() and fixes a few
cases that should not produce an arrow function AST but did:

    (a,,) => {}
    (a b) => {}
    (a ...b) => {}
    (...b a) => {}

The new parsing logic checks whether parens are expected and uses
parse_function_parameters() if so, rolling back if a new syntax error
occurs during that. Otherwise it's just an identifier in which case we
parse the single parameter ourselves.
2020-10-19 11:31:55 +02:00
..
arrow-functions.js LibJS: Share parameter parsing between regular and arrow functions 2020-10-19 11:31:55 +02:00
constructor-basic.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
function-default-parameters.js Everywhere: Fix typos 2020-10-02 16:03:17 +02:00
function-hoisting.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
function-length.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
function-missing-arg.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
function-name.js LibJS: Do not revisit already visited values in update_function_name() 2020-09-19 00:33:56 +02:00
function-rest-params.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
function-spread.js LibJS: Integrate iterator protocol into language features 2020-07-14 17:58:42 +02:00
function-strict-mode.js Everywhere: Fix typos 2020-10-02 16:03:17 +02:00
function-this-in-arguments.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
function-TypeError.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00