Abacus/core/src/main/kotlin/org/nwapw/abacus/function/Operator.kt

13 lines
600 B
Kotlin
Raw Normal View History

2017-08-07 19:16:51 -07:00
package org.nwapw.abacus.function
/**
* A single operator that can be used by Abacus.
*
* This is a class that holds the information about a single operator, such as a plus or minus.
2017-08-07 19:16:51 -07:00
*
* @param associativity the associativity of this operator, used for order of operations;.
* @param type the type of this operator, used for parsing (infix / prefix / postfix and binary / unary)
* @param precedence the precedence of this operator, used for order of operations.
*/
2017-08-25 15:42:10 -07:00
open class Operator(val associativity: OperatorAssociativity, val type: OperatorType,
2017-08-26 12:19:34 -07:00
val precedence: Int)