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

LibJS: Allow division after this token

This fixes the root cause of #21747, so it makes the clock work on
https://toaruos.org
This commit is contained in:
Simon Wanner 2023-11-04 20:40:12 +01:00 committed by Andreas Kling
parent 969d9e1fd3
commit a3f34263fd
2 changed files with 5 additions and 1 deletions

View file

@ -1643,7 +1643,7 @@ Parser::PrimaryExpressionParseResult Parser::parse_primary_expression()
return { move(expression) };
}
case TokenType::This:
consume();
consume_and_allow_division();
return { create_ast_node<ThisExpression>({ m_source_code, rule_start.position(), position() }) };
case TokenType::Class:
return { parse_class_expression(false) };