From ca2681cc210eb08728f3020854c3bb686e501194 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Fri, 25 Aug 2017 15:49:35 -0700 Subject: [PATCH] Add a TreeValueOperator. --- .../nwapw/abacus/function/TreeValueOperator.kt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 core/src/main/kotlin/org/nwapw/abacus/function/TreeValueOperator.kt diff --git a/core/src/main/kotlin/org/nwapw/abacus/function/TreeValueOperator.kt b/core/src/main/kotlin/org/nwapw/abacus/function/TreeValueOperator.kt new file mode 100644 index 0000000..beed6b2 --- /dev/null +++ b/core/src/main/kotlin/org/nwapw/abacus/function/TreeValueOperator.kt @@ -0,0 +1,15 @@ +package org.nwapw.abacus.function + +import org.nwapw.abacus.number.NumberInterface +import javax.swing.tree.TreeNode + +/** + * An operator that operates on trees. + * + * This operator operates on parse trees, returning, however a number. + * @param associativity the associativity of the operator. + * @param type the type of the operator (infix, postfix, etc) + * @param precedence the precedence of the operator. + */ +abstract class TreeValueOperator(associativity: OperatorAssociativity, type: OperatorType, + precedence: Int) : ReducerApplicable \ No newline at end of file