New operator %=

This commit is contained in:
2024-12-19 15:14:30 +01:00
parent 6ee21e10af
commit 8e5550bfa7
7 changed files with 21 additions and 166 deletions
+2
View File
@@ -181,6 +181,8 @@ func evalOpAssign(ctx ExprContext, opTerm *term) (v any, err error) {
v, err = mulValues(opTerm, leftValue, rightValue)
case SymSlashEqual:
v, err = divValues(opTerm, leftValue, rightValue)
case SymPercEqual:
v, err = remainderValues(opTerm, leftValue, rightValue)
default:
err = opTerm.Errorf("unsupported assign operator %q", opTerm.source())
}