diff options
author | Iru Cai <mytbk920423@gmail.com> | 2014-11-03 01:46:06 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2014-11-03 01:46:06 +0800 |
commit | 5fa82beb2b420cc63111c186a670abcb674ba373 (patch) | |
tree | 7c16037088e74216ca0e146602b8653ab1cbf898 /src/piglet/piglet2spiglet/PigletExpr.java | |
parent | 400909d160c5a348f1f4015add94a69fa1855cfd (diff) | |
download | minijava-5fa82beb2b420cc63111c186a670abcb674ba373.tar.xz |
piglet to spiglet
Diffstat (limited to 'src/piglet/piglet2spiglet/PigletExpr.java')
-rw-r--r-- | src/piglet/piglet2spiglet/PigletExpr.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/piglet/piglet2spiglet/PigletExpr.java b/src/piglet/piglet2spiglet/PigletExpr.java new file mode 100644 index 0000000..a8289e6 --- /dev/null +++ b/src/piglet/piglet2spiglet/PigletExpr.java @@ -0,0 +1,19 @@ +package piglet.piglet2spiglet; + +public class PigletExpr { + public enum Expr_t { Temp, Int, Label, Other }; + public Expr_t type; + public String s; + public PigletExpr(Expr_t t, String _s) { + type = t; + s = _s; + } + + public boolean isSimple() { + return type==Expr_t.Temp || type==Expr_t.Int || type==Expr_t.Label; + } + + public String toString() { + return s; + } +} |