Skip to content

Commit

Permalink
Merge branch 'version/7.2.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
me4502 committed Feb 25, 2024
2 parents f357eca + 93aee51 commit 98750e0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PLUS : '+' ;
MINUS : '-' ;
TIMES : '*' ;
DIVIDE : '/' ;
MODULO : '%' ;
REMAINDER : '%' ;
POWER : '^' | '**' ;
LEFT_SHIFT : '<<' ;
RIGHT_SHIFT : '>>' ;
Expand All @@ -17,7 +17,7 @@ PLUS_ASSIGN : '+=' ;
MINUS_ASSIGN : '-=' ;
TIMES_ASSIGN : '*=' ;
DIVIDE_ASSIGN : '/=' ;
MODULO_ASSIGN : '%=' ;
REMAINDER_ASSIGN : '%=' ;
POWER_ASSIGN : '^=' ;

EQUAL : '==' ;
Expand Down Expand Up @@ -144,7 +144,7 @@ assignmentOperator
| POWER_ASSIGN
| TIMES_ASSIGN
| DIVIDE_ASSIGN
| MODULO_ASSIGN
| REMAINDER_ASSIGN
| PLUS_ASSIGN
| MINUS_ASSIGN
;
Expand Down Expand Up @@ -202,7 +202,7 @@ multiplicativeExpression
op=
( TIMES
| DIVIDE
| MODULO
| REMAINDER
) right=powerExpression # MultiplicativeExpr
;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
* <ul>
* <li>Logical: &amp;&amp;, ||, ! (unary)</li>
* <li>Bitwise: ~ (unary), &gt;&gt;, &lt;&lt;</li>
* <li>Arithmetic: +, -, *, /, % (modulo), ^ (power), - (unary), --, ++ (prefix only)</li>
* <li>Arithmetic: +, -, *, /, % (remainder), ^ (power), - (unary), --, ++ (prefix only)</li>
* <li>Comparison: &lt;=, &gt;=, &gt;, &lt;, ==, !=, ~= (near)</li>
* </ul>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@
import static com.sk89q.worldedit.antlr.ExpressionLexer.LESS_THAN_OR_EQUAL;
import static com.sk89q.worldedit.antlr.ExpressionLexer.MINUS;
import static com.sk89q.worldedit.antlr.ExpressionLexer.MINUS_ASSIGN;
import static com.sk89q.worldedit.antlr.ExpressionLexer.MODULO;
import static com.sk89q.worldedit.antlr.ExpressionLexer.MODULO_ASSIGN;
import static com.sk89q.worldedit.antlr.ExpressionLexer.NEAR;
import static com.sk89q.worldedit.antlr.ExpressionLexer.NOT_EQUAL;
import static com.sk89q.worldedit.antlr.ExpressionLexer.PLUS;
import static com.sk89q.worldedit.antlr.ExpressionLexer.PLUS_ASSIGN;
import static com.sk89q.worldedit.antlr.ExpressionLexer.POWER_ASSIGN;
import static com.sk89q.worldedit.antlr.ExpressionLexer.REMAINDER;
import static com.sk89q.worldedit.antlr.ExpressionLexer.REMAINDER_ASSIGN;
import static com.sk89q.worldedit.antlr.ExpressionLexer.RIGHT_SHIFT;
import static com.sk89q.worldedit.antlr.ExpressionLexer.TIMES;
import static com.sk89q.worldedit.antlr.ExpressionLexer.TIMES_ASSIGN;
Expand Down Expand Up @@ -401,7 +401,7 @@ public MethodHandle visitMultiplicativeExpr(ExpressionParser.MultiplicativeExprC
return (l, r) -> l * r;
case DIVIDE:
return (l, r) -> l / r;
case MODULO:
case REMAINDER:
return (l, r) -> l % r;
default:
throw ExpressionHelper.evalException(ctx, "Invalid text for multiplicative expr: " + ctx.op.getText());
Expand Down Expand Up @@ -553,7 +553,7 @@ public MethodHandle visitAssignment(ExpressionParser.AssignmentContext ctx) {
case DIVIDE_ASSIGN:
value /= arg;
break;
case MODULO_ASSIGN:
case REMAINDER_ASSIGN:
value %= arg;
break;
case PLUS_ASSIGN:
Expand Down

0 comments on commit 98750e0

Please sign in to comment.