Skip to content

Commit

Permalink
Fix %= (modulo-assignment) operator
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Mar 24, 2024
1 parent 2aac80b commit f5cc405
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ XP AST ChangeLog

## ?.?.? / ????-??-??

## 11.0.1 / 2024-03-24

* Fixed `%=` (modulo-assignment) operator - @thekid

## 11.0.0 / 2024-03-23

* Merged PR #51: Logical Operators and Assignment Expressions - @thekid
Expand Down
1 change: 1 addition & 0 deletions src/main/php/lang/ast/syntax/PHP.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ public function __construct() {
$this->assignment('-=');
$this->assignment('*=');
$this->assignment('/=');
$this->assignment('%=');
$this->assignment('.=');
$this->assignment('**=');
$this->assignment('>>=');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function prefix($operator) {
);
}

#[Test, Values(['=', '+=', '-=', '*=', '/=', '.=', '**=', '&=', '|=', '^=', '>>=', '<<=', '??=', '&&=', '||='])]
#[Test, Values(['=', '+=', '-=', '*=', '/=', '%=', '.=', '**=', '&=', '|=', '^=', '>>=', '<<=', '??=', '&&=', '||='])]
public function assignment($operator) {
$this->assertParsed(
[new Assignment(new Variable('a', self::LINE), $operator, new Variable('b', self::LINE), self::LINE)],
Expand Down

0 comments on commit f5cc405

Please sign in to comment.