diff --git a/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorAdd.kt b/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorAdd.kt index 288fe3c..9e2c00b 100644 --- a/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorAdd.kt +++ b/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorAdd.kt @@ -11,7 +11,7 @@ import org.nwapw.abacus.number.NumberInterface * * This is a standard operator that simply performs addition. */ -class OperatorAdd: NumberOperator(OperatorAssociativity.LEFT, OperatorType.BINARY_INFIX, 0) { +class OperatorAdd: NumberOperator(OperatorAssociativity.LEFT, OperatorType.BINARY_INFIX, 1) { override fun matchesParams(context: PluginEvaluationContext, params: Array) = params.size == 2 diff --git a/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorCaret.kt b/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorCaret.kt index 2b5b8fd..eb8d793 100644 --- a/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorCaret.kt +++ b/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorCaret.kt @@ -12,7 +12,7 @@ import org.nwapw.abacus.plugin.standard.StandardPlugin.* * * This is a standard operator that brings one number to the power of the other. */ -class OperatorCaret: NumberOperator(OperatorAssociativity.RIGHT, OperatorType.BINARY_INFIX, 2) { +class OperatorCaret: NumberOperator(OperatorAssociativity.RIGHT, OperatorType.BINARY_INFIX, 3) { override fun matchesParams(context: PluginEvaluationContext, params: Array) = params.size == 2 diff --git a/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorDivide.kt b/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorDivide.kt index 669ddc2..5da26b8 100644 --- a/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorDivide.kt +++ b/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorDivide.kt @@ -11,7 +11,7 @@ import org.nwapw.abacus.number.NumberInterface * * This is a standard operator that simply performs division. */ -class OperatorDivide: NumberOperator(OperatorAssociativity.LEFT, OperatorType.BINARY_INFIX, 1) { +class OperatorDivide: NumberOperator(OperatorAssociativity.LEFT, OperatorType.BINARY_INFIX, 2) { override fun matchesParams(context: PluginEvaluationContext, params: Array) = params.size == 2 diff --git a/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorMultiply.kt b/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorMultiply.kt index ca6e8cb..7d39ace 100644 --- a/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorMultiply.kt +++ b/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorMultiply.kt @@ -11,7 +11,7 @@ import org.nwapw.abacus.number.NumberInterface * * This is a standard operator that simply performs multiplication. */ -class OperatorMultiply: NumberOperator(OperatorAssociativity.LEFT, OperatorType.BINARY_INFIX, 1) { +class OperatorMultiply: NumberOperator(OperatorAssociativity.LEFT, OperatorType.BINARY_INFIX, 2) { override fun matchesParams(context: PluginEvaluationContext, params: Array) = params.size == 2 diff --git a/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorNcr.kt b/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorNcr.kt index 7390f28..d8644bc 100644 --- a/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorNcr.kt +++ b/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorNcr.kt @@ -14,7 +14,7 @@ import org.nwapw.abacus.plugin.standard.StandardPlugin.OP_NPR * This is a standard operator that returns the number of possible combinations, regardless of order, * of a certain size can be taken out of a pool of a bigger size. */ -class OperatorNcr: NumberOperator(OperatorAssociativity.RIGHT, OperatorType.BINARY_INFIX, 0) { +class OperatorNcr: NumberOperator(OperatorAssociativity.RIGHT, OperatorType.BINARY_INFIX, 1) { override fun matchesParams(context: PluginEvaluationContext, params: Array) = params.size == 2 && params[0].isInteger() diff --git a/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorNpr.kt b/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorNpr.kt index a70de36..e249cb1 100644 --- a/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorNpr.kt +++ b/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorNpr.kt @@ -12,7 +12,7 @@ import org.nwapw.abacus.number.NumberInterface * his is a standard operator that returns the number of possible combinations * of a certain size can be taken out of a pool of a bigger size. */ -class OperatorNpr: NumberOperator(OperatorAssociativity.RIGHT, OperatorType.BINARY_INFIX, 0) { +class OperatorNpr: NumberOperator(OperatorAssociativity.RIGHT, OperatorType.BINARY_INFIX, 1) { override fun matchesParams(context: PluginEvaluationContext, params: Array) = params.size == 2 && params[0].isInteger() diff --git a/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorSubtract.kt b/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorSubtract.kt index 9616286..6c4da15 100644 --- a/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorSubtract.kt +++ b/core/src/main/kotlin/org/nwapw/abacus/plugin/standard/operator/OperatorSubtract.kt @@ -11,7 +11,7 @@ import org.nwapw.abacus.number.NumberInterface * * This is a standard operator that performs subtraction. */ -class OperatorSubtract: NumberOperator(OperatorAssociativity.LEFT, OperatorType.BINARY_INFIX, 0) { +class OperatorSubtract: NumberOperator(OperatorAssociativity.LEFT, OperatorType.BINARY_INFIX, 1) { override fun matchesParams(context: PluginEvaluationContext, params: Array) = params.size == 2