summaryrefslogtreecommitdiff
path: root/dice-lang/src/main/java/bjc/dicelang/ast/nodes/OperatorDiceNode.java
diff options
context:
space:
mode:
Diffstat (limited to 'dice-lang/src/main/java/bjc/dicelang/ast/nodes/OperatorDiceNode.java')
-rw-r--r--dice-lang/src/main/java/bjc/dicelang/ast/nodes/OperatorDiceNode.java26
1 files changed, 16 insertions, 10 deletions
diff --git a/dice-lang/src/main/java/bjc/dicelang/ast/nodes/OperatorDiceNode.java b/dice-lang/src/main/java/bjc/dicelang/ast/nodes/OperatorDiceNode.java
index ab47b56..c0f7bd3 100644
--- a/dice-lang/src/main/java/bjc/dicelang/ast/nodes/OperatorDiceNode.java
+++ b/dice-lang/src/main/java/bjc/dicelang/ast/nodes/OperatorDiceNode.java
@@ -14,29 +14,33 @@ public enum OperatorDiceNode implements IDiceASTNode {
*/
ADD(MATH),
/**
- * Represents assigning one node to another
+ * Represents dividing two nodes
*/
- ASSIGN(EXPRESSION),
+ DIVIDE(MATH),
/**
- * Representings combining two node values together
+ * Represents multiplying two nodes
*/
- COMPOUND(DICE),
+ MULTIPLY(MATH),
/**
- * Represents dividing two nodes
+ * Represents subtracting two nodes
*/
- DIVIDE(MATH),
+ SUBTRACT(MATH),
+ /**
+ * Representings combining two node values together
+ */
+ COMPOUND(DICE),
/**
* Represents using one node a variable number of times
*/
GROUP(DICE),
/**
- * Represents multiplying two nodes
+ * Represents assigning one node to another
*/
- MULTIPLY(MATH),
+ ASSIGN(EXPRESSION),
/**
- * Represents subtracting two nodes
+ * Represents evaluating one expression in the context of another
*/
- SUBTRACT(MATH);
+ LET(EXPRESSION);
/**
* Represents the group of operator this operator is sorted into.
@@ -73,6 +77,8 @@ public enum OperatorDiceNode implements IDiceASTNode {
case "c":
case "compound":
return COMPOUND;
+ case "=>":
+ return LET;
default:
throw new IllegalArgumentException(
s + " is not a valid operator node");