mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:07:45 +00:00
LibJS: Check that 'let' is followed by declaration before matching it
Since 'let' is a valid variable name (in non-strict mode) let may not be the start of a declaration but just an identifier.
This commit is contained in:
parent
179c48e1a4
commit
5f344f7ca3
2 changed files with 36 additions and 4 deletions
|
@ -159,8 +159,9 @@ private:
|
|||
bool match_secondary_expression(const Vector<TokenType>& forbidden = {}) const;
|
||||
bool match_statement() const;
|
||||
bool match_export_or_import() const;
|
||||
bool match_declaration() const;
|
||||
bool match_variable_declaration() const;
|
||||
bool match_declaration();
|
||||
bool try_match_let_declaration();
|
||||
bool match_variable_declaration();
|
||||
bool match_identifier() const;
|
||||
bool match_identifier_name() const;
|
||||
bool match_property_key() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue