summaryrefslogtreecommitdiff
path: root/dice-lang/src/main/java/bjc/dicelang/ast/nodes/ILiteralDiceNode.java
diff options
context:
space:
mode:
authorbculkin2442 <bjculkin@mix.wvu.edu>2016-04-22 14:48:25 -0400
committerbculkin2442 <bjculkin@mix.wvu.edu>2016-04-22 14:48:25 -0400
commit0fa4f162f4e42a455dbb7e7459854b9467337863 (patch)
tree64e22da06f641f2ad1d2e1f0dc6f818b404c8661 /dice-lang/src/main/java/bjc/dicelang/ast/nodes/ILiteralDiceNode.java
parenta3e0b3da5d7b0ec8dcae92a428f8e3f1c6cd6e8e (diff)
Formatting changes
Diffstat (limited to 'dice-lang/src/main/java/bjc/dicelang/ast/nodes/ILiteralDiceNode.java')
-rw-r--r--dice-lang/src/main/java/bjc/dicelang/ast/nodes/ILiteralDiceNode.java66
1 files changed, 33 insertions, 33 deletions
diff --git a/dice-lang/src/main/java/bjc/dicelang/ast/nodes/ILiteralDiceNode.java b/dice-lang/src/main/java/bjc/dicelang/ast/nodes/ILiteralDiceNode.java
index 994a680..2105102 100644
--- a/dice-lang/src/main/java/bjc/dicelang/ast/nodes/ILiteralDiceNode.java
+++ b/dice-lang/src/main/java/bjc/dicelang/ast/nodes/ILiteralDiceNode.java
@@ -9,39 +9,6 @@ import org.apache.commons.lang3.StringUtils;
*
*/
public interface ILiteralDiceNode extends IDiceASTNode {
- @Override
- default DiceASTType getType() {
- return DiceASTType.LITERAL;
- }
-
- @Override
- default boolean isOperator() {
- return false;
- }
-
- /**
- * Get the type of literal this node represents
- *
- * @return The type of literal this node represents
- */
- DiceLiteralType getLiteralType();
-
- /**
- * Optimize this node to a constant if possible
- *
- * @return This node in constant form if possible
- * @see bjc.dicelang.IDiceExpression#optimize()
- */
- int optimize();
-
- /**
- * Check if this node can be optimized to a constant
- *
- * @return Whether or not this node can be optimized to a constant
- * @see bjc.dicelang.IDiceExpression#canOptimize()
- */
- boolean canOptimize();
-
/**
* Check if a token represents a literal, and if so, what type
*
@@ -67,4 +34,37 @@ public interface ILiteralDiceNode extends IDiceASTNode {
}
}
}
+
+ /**
+ * Check if this node can be optimized to a constant
+ *
+ * @return Whether or not this node can be optimized to a constant
+ * @see bjc.dicelang.IDiceExpression#canOptimize()
+ */
+ boolean canOptimize();
+
+ /**
+ * Get the type of literal this node represents
+ *
+ * @return The type of literal this node represents
+ */
+ DiceLiteralType getLiteralType();
+
+ @Override
+ default DiceASTType getType() {
+ return DiceASTType.LITERAL;
+ }
+
+ @Override
+ default boolean isOperator() {
+ return false;
+ }
+
+ /**
+ * Optimize this node to a constant if possible
+ *
+ * @return This node in constant form if possible
+ * @see bjc.dicelang.IDiceExpression#optimize()
+ */
+ int optimize();
}