ladybird/Libraries/LibJS
Matthew Olsson 419bce6915 LibJS: Fix syntax error for arrow function non-decl variable assignment
A regression was introduced in dc9b4da where the parser would
incorrectly parse the assignment of arrow functions to (non-declaration)
variables. For example, consider:

    a = () => {}

Because the parser was aware of default parameters, in
try_parse_arrow_function, the equals sign would be interpreted as a
default argument, leading to incorrect parsing of the overall
expression. Also resulted in some funny behavior
(a = () => {} => {} worked just fine!).

The simple fix is to only look for default parameters if the arrow
function is required to have parenthesis.
2020-05-06 12:21:29 +02:00
..
Heap LibJS: run clang-format on all the files 2020-05-05 09:15:16 +02:00
Runtime LibJS: Switch objects to unique shape after 100 property additions 2020-05-05 18:49:45 +02:00
Tests LibJS: Fix syntax error for arrow function non-decl variable assignment 2020-05-06 12:21:29 +02:00
AST.cpp LibJS: Implement modulo assignment operator (%=) 2020-05-05 11:12:27 +02:00
AST.h LibJS: Implement modulo assignment operator (%=) 2020-05-05 11:12:27 +02:00
Console.cpp LibJS: Implement ConsoleClient 2020-05-05 09:15:16 +02:00
Console.h LibJS: Implement ConsoleClient 2020-05-05 09:15:16 +02:00
Forward.h LibJS: Add Reference class to represent a base.property reference 2020-04-28 15:07:08 +02:00
Interpreter.cpp LibJS: Add some helpers and use them to re-implement Console functions 2020-05-05 09:15:16 +02:00
Interpreter.h LibJS: Add some helpers and use them to re-implement Console functions 2020-05-05 09:15:16 +02:00
Lexer.cpp LibJS: Implement exponentiation assignment operator (**=) 2020-05-05 11:12:27 +02:00
Lexer.h LibJS: Add template literals 2020-05-04 16:46:31 +02:00
Makefile LibJS: Start implementing a Console class for the interpreter 2020-05-02 11:41:35 +02:00
Parser.cpp LibJS: Fix syntax error for arrow function non-decl variable assignment 2020-05-06 12:21:29 +02:00
Parser.h LibJS: Add template literals 2020-05-04 16:46:31 +02:00
Token.cpp LibJS: Add template literals 2020-05-04 16:46:31 +02:00
Token.h LibJS: Implement exponentiation assignment operator (**=) 2020-05-05 11:12:27 +02:00