summaryrefslogtreecommitdiff
path: root/dice-lang/src/main/java/bjc/dicelang/ast/nodes/OperatorDiceNode.java
diff options
context:
space:
mode:
authorbculkin2442 <bjculkin@mix.wvu.edu>2016-04-22 14:29:19 -0400
committerbculkin2442 <bjculkin@mix.wvu.edu>2016-04-22 14:29:19 -0400
commita3e0b3da5d7b0ec8dcae92a428f8e3f1c6cd6e8e (patch)
treebd23ebdddaa0fdfd223afdcb66b41104c2a1ebaa /dice-lang/src/main/java/bjc/dicelang/ast/nodes/OperatorDiceNode.java
parentece202806a0621329a9c301996d0f519b018e9bd (diff)
Formatting changes
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.java12
1 files changed, 10 insertions, 2 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 18df122..411548a 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
@@ -1,6 +1,8 @@
package bjc.dicelang.ast.nodes;
-import static bjc.dicelang.ast.nodes.DiceOperatorType.*;
+import static bjc.dicelang.ast.nodes.DiceOperatorType.DICE;
+import static bjc.dicelang.ast.nodes.DiceOperatorType.EXPRESSION;
+import static bjc.dicelang.ast.nodes.DiceOperatorType.MATH;
/**
* A node that represents an operator
@@ -36,12 +38,16 @@ public enum OperatorDiceNode implements IDiceASTNode {
/**
* Represents constructing an array from a sequence of expressions
*/
- ARRAY(EXPRESSION),
+ ARRAY(DiceOperatorType.ARRAY),
/**
* Represents assigning one node to another
*/
ASSIGN(EXPRESSION),
/**
+ * Represents calling a function
+ */
+ CALL(EXPRESSION),
+ /**
* Represents evaluating one expression in the context of another
*/
LET(EXPRESSION);
@@ -85,6 +91,8 @@ public enum OperatorDiceNode implements IDiceASTNode {
return LET;
case "[]":
return ARRAY;
+ case "call":
+ return CALL;
default:
throw new IllegalArgumentException(
s + " is not a valid operator node");