diff options
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 | 12 |
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"); |
