summaryrefslogtreecommitdiff
path: root/submit/ast/BinaryOperatorType.java
diff options
context:
space:
mode:
Diffstat (limited to 'submit/ast/BinaryOperatorType.java')
-rw-r--r--submit/ast/BinaryOperatorType.java24
1 files changed, 16 insertions, 8 deletions
diff --git a/submit/ast/BinaryOperatorType.java b/submit/ast/BinaryOperatorType.java
index 37235c8..fea3d6e 100644
--- a/submit/ast/BinaryOperatorType.java
+++ b/submit/ast/BinaryOperatorType.java
@@ -10,15 +10,23 @@ package submit.ast;
*/
public enum BinaryOperatorType {
- OR("||"), AND("&&"),
- LE("<="), LT("<"), GT(">"), GE(">="), EQ("=="), NE("!="),
- PLUS("+"), MINUS("-"), TIMES("*"), DIVIDE("/"), MOD("%");
+ OR("||"),
+ AND("&&"),
+ LE("<="),
+ LT("<"),
+ GT(">"),
+ GE(">="),
+ EQ("=="),
+ NE("!="),
+ PLUS("+"),
+ MINUS("-"),
+ TIMES("*"),
+ DIVIDE("/"),
+ MOD("%");
private final String value;
- private BinaryOperatorType(String value) {
- this.value = value;
- }
+ private BinaryOperatorType(String value) { this.value = value; }
public static BinaryOperatorType fromString(String s) {
for (BinaryOperatorType at : BinaryOperatorType.values()) {
@@ -26,12 +34,12 @@ public enum BinaryOperatorType {
return at;
}
}
- throw new RuntimeException("Illegal string in OperatorType.fromString(): " + s);
+ throw new RuntimeException("Illegal string in OperatorType.fromString(): " +
+ s);
}
@Override
public String toString() {
return value;
}
-
}