summaryrefslogtreecommitdiff
path: root/submit/ast/BinaryOperatorType.java
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-04-23 00:24:42 -0600
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-04-23 00:24:42 -0600
commita1c15f046183373baf5deb66e77188e656806fb7 (patch)
treefc1a7f584e67dc583d335f09d5271a45ff7d9df4 /submit/ast/BinaryOperatorType.java
parent5f28f80c4e25a56cd444914c2f0b3da5e7fdb088 (diff)
downloadcminus-main.tar.gz
cminus-main.zip
squash all the thingsHEADmain
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;
}
-
}