Compound assign statement

This commit is contained in:
2026-05-16 22:40:01 +02:00
parent 60e5995dc6
commit c9030809fd
5 changed files with 52 additions and 8 deletions
+17
View File
@@ -314,6 +314,7 @@ statement = _{
expr_stmt
| match_stmt
| assign_statement
| compound_assign_statement
| if_stmt
| while_stmt
| c_for_stmt
@@ -353,6 +354,22 @@ assign_statement = {
expr ~ "=" ~ expr ~ semicolon
}
compound_assign = {
"+="
| "-="
| "/="
| "%="
| "&="
| "|="
| "^="
| "<<="
| ">>="
}
compound_assign_statement = {
expr ~ compound_assign ~ expr ~ semicolon
}
// ------------------------------------------------------
// CONDITIONALS
// ------------------------------------------------------