diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-04-18 13:04:01 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-04-18 13:04:01 -0400 |
| commit | 24f3ce54983348e1aa0229d5c08b3fe99d739d40 (patch) | |
| tree | 948277e2519e2dffcb3fa2b2bf2ee649c21c2e3c /dice-lang/src/main/java/bjc/dicelang/ast/nodes/OperatorDiceNode.java | |
| parent | 9ce39956fa1702f157c347dc4b8807d9b5dd2185 (diff) | |
Added operation condensing
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.java | 26 |
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"); |
