1
0
mirror of https://github.com/DanilaFe/abacus synced 2026-01-25 08:05:19 +00:00

Compare commits

..

2 Commits

Author SHA1 Message Date
ac17246317 Fix bug causing incorrect parsing of inputs with negative signs. 2018-01-30 21:10:02 -08:00
18e0bdebc5 Merge pull request #54 from DanilaFe/precedence-fix
Make sure the set and define operators have the lowest precedence.
2018-01-16 00:16:46 -08:00

View File

@@ -11,7 +11,7 @@ import org.nwapw.abacus.number.NumberInterface
*
* This is a standard operator that negates a number.
*/
class OperatorNegate: NumberOperator(OperatorAssociativity.LEFT, OperatorType.UNARY_PREFIX, 0) {
class OperatorNegate: NumberOperator(OperatorAssociativity.LEFT, OperatorType.UNARY_PREFIX, 1) {
override fun matchesParams(context: PluginEvaluationContext, params: Array<out NumberInterface>) =
params.size == 1