mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 18:15:07 +00:00
LibJS: Implement multiplication and division operators
This commit is contained in:
parent
9f3f0d9983
commit
fdf7f81ba9
5 changed files with 34 additions and 1 deletions
|
@ -127,6 +127,12 @@ NonnullOwnPtr<Expression> Parser::parse_secondary_expression(NonnullOwnPtr<Expre
|
|||
case TokenType::Minus:
|
||||
consume();
|
||||
return make<BinaryExpression>(BinaryOp::Minus, move(lhs), parse_expression());
|
||||
case TokenType::Asterisk:
|
||||
consume();
|
||||
return make<BinaryExpression>(BinaryOp::Asterisk, move(lhs), parse_expression());
|
||||
case TokenType::Slash:
|
||||
consume();
|
||||
return make<BinaryExpression>(BinaryOp::Slash, move(lhs), parse_expression());
|
||||
case TokenType::ParenOpen:
|
||||
return parse_call_expression(move(lhs));
|
||||
case TokenType::Equals:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue