diff options
| author | Ben Culkin <scorpress@gmail.com> | 2020-11-21 18:04:20 -0500 |
|---|---|---|
| committer | Ben Culkin <scorpress@gmail.com> | 2020-11-21 18:04:20 -0500 |
| commit | 3ddd062d60d621971af59b480ba70e8bf9e705f1 (patch) | |
| tree | 8d24f91e4f695a526777b5fe75fe268669b8c9a6 /dice/src/example/java/bjc/dicelang/neodice/statements/StatementValue.java | |
| parent | 2afb54eecd8e8b5d663a05131c07c6b8d15e65ba (diff) | |
Rudimentary CLI for new die implementation
Diffstat (limited to 'dice/src/example/java/bjc/dicelang/neodice/statements/StatementValue.java')
| -rw-r--r-- | dice/src/example/java/bjc/dicelang/neodice/statements/StatementValue.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/dice/src/example/java/bjc/dicelang/neodice/statements/StatementValue.java b/dice/src/example/java/bjc/dicelang/neodice/statements/StatementValue.java new file mode 100644 index 0000000..5090bc7 --- /dev/null +++ b/dice/src/example/java/bjc/dicelang/neodice/statements/StatementValue.java @@ -0,0 +1,40 @@ +package bjc.dicelang.neodice.statements; + +import java.util.*; + +public abstract class StatementValue { + public static enum Type { + VOID, + BOOLEAN, + INTEGER, + + INT_ARRAY, + + DIE, + DIEPOOL, + + ARRAY, + } + + public final Type type; + + protected StatementValue(Type type) { + this.type = type; + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) return true; + if (obj == null) return false; + if (getClass() != obj.getClass()) return false; + + StatementValue other = (StatementValue) obj; + + return type == other.type; + } +}
\ No newline at end of file |
