mirror of https://github.com/DanilaFe/abacus
Compare commits
6 Commits
v0.1.3-ALP
...
master
Author | SHA1 | Date |
---|---|---|
Danila Fedorin | 15394b7ea0 | |
Danila Fedorin | cc2da711e7 | |
Danila Fedorin | ef39bcbaa2 | |
Danila Fedorin | ac17246317 | |
Danila Fedorin | 18e0bdebc5 | |
Danila Fedorin | 251d0fc2c5 |
|
@ -1,6 +1,6 @@
|
|||
buildscript {
|
||||
ext.kotlin_version = '1.1.3'
|
||||
ext.dokka_version = '0.9.15'
|
||||
ext.kotlin_version = '1.2.40'
|
||||
ext.dokka_version = '0.9.16'
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
|
@ -23,7 +23,7 @@ subprojects {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.3"
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.40"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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<out NumberInterface>) =
|
||||
params.size == 2
|
||||
|
|
|
@ -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<out NumberInterface>) =
|
||||
params.size == 2
|
||||
|
|
|
@ -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<out NumberInterface>) =
|
||||
params.size == 2
|
||||
|
|
|
@ -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<out NumberInterface>) =
|
||||
params.size == 2
|
||||
|
|
|
@ -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<out NumberInterface>) =
|
||||
params.size == 2 && params[0].isInteger()
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<out NumberInterface>) =
|
||||
params.size == 2 && params[0].isInteger()
|
||||
|
|
|
@ -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<out NumberInterface>) =
|
||||
params.size == 2
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
apply plugin: 'application'
|
||||
|
||||
dependencies {
|
||||
compile 'com.moandjiezana.toml:toml4j:0.7.1'
|
||||
compile 'com.moandjiezana.toml:toml4j:0.7.2'
|
||||
compile project(':core')
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
|
@ -1,6 +1,5 @@
|
|||
#Fri Jul 28 17:18:51 PDT 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-bin.zip
|
||||
|
|
|
@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
|
|||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
|
@ -155,7 +155,7 @@ if $cygwin ; then
|
|||
fi
|
||||
|
||||
# Escape application args
|
||||
save ( ) {
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue