1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00

LibJS: Consume semicolon at the end of a statement

A bunch of code was relying on this not happenind, in particular the
parsing of "for" statements. Reorganized things so they work again.
This commit is contained in:
Andreas Kling 2020-03-23 19:08:32 +01:00
parent fbb9e1b715
commit df524203b2
3 changed files with 32 additions and 15 deletions

View file

@ -70,6 +70,7 @@ private:
bool match_unary_prefixed_expression() const;
bool match_secondary_expression() const;
bool match_statement() const;
bool match_variable_declaration() const;
bool match(TokenType type) const;
bool done() const;
void expected(const char* what);