ladybird/Libraries/LibJS
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
..
Heap Everywhere: Add missing <AK/TemporaryChange.h> includes 2020-10-15 23:49:53 +02:00
Runtime LibJS: Use allocate_without_global_object for allocating Shapes 2020-10-17 23:47:07 +02:00
Tests LibJS: Share parameter parsing between regular and arrow functions 2020-10-19 11:31:55 +02:00
AST.cpp LibJS: Fix dump() indentation of UpdateExpression with suffix operator 2020-10-19 11:31:55 +02:00
AST.h LibJS: Implement logical assignment operators (&&=, ||=, ??=) 2020-10-05 17:57:26 +02:00
CMakeLists.txt LibJS: Split Heap into per-cell-size allocators 2020-10-06 18:50:47 +02:00
Console.cpp LibJS: Move Console from Interpreter to GlobalObject 2020-09-29 21:15:06 +02:00
Console.h LibJS: Move Console from Interpreter to GlobalObject 2020-09-29 21:15:06 +02:00
Forward.h LibJS: Split Heap into per-cell-size allocators 2020-10-06 18:50:47 +02:00
Interpreter.cpp LibJS: Cache commonly used FlyStrings in the VM 2020-10-13 23:57:45 +02:00
Interpreter.h LibJS: Remove some unused Interpreter member functions 2020-10-04 23:10:07 +02:00
Lexer.cpp LibJS: Fix parsing of invalid numeric literals 2020-10-18 15:38:57 +02:00
Lexer.h LibJS: Fix parsing of invalid numeric literals 2020-10-18 15:38:57 +02:00
MarkupGenerator.cpp LibJS: Unify syntax highlighting 2020-10-04 23:41:31 +02:00
MarkupGenerator.h Meta: Add a script check the presence of "#pragma once" in header files 2020-05-29 07:59:45 +02:00
Parser.cpp LibJS: Share parameter parsing between regular and arrow functions 2020-10-19 11:31:55 +02:00
Parser.h LibJS: Share parameter parsing between regular and arrow functions 2020-10-19 11:31:55 +02:00
Token.cpp LibJS: Unify syntax highlighting 2020-10-04 23:41:31 +02:00
Token.h LibJS: Implement logical assignment operators (&&=, ||=, ??=) 2020-10-05 17:57:26 +02:00