diff options
author | paltherr <paltherr@epfl.ch> | 2003-11-05 15:52:48 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-11-05 15:52:48 +0000 |
commit | eb2a2e931007589af2d65b466ded47e2fad14ada (patch) | |
tree | 81a3a1649ab3ddb46c29d8296ab8cd1c6c56ef54 /sources/scalac/atree/AConstant.java | |
parent | aa8b75a4cb71a2619e6757e25f01104898fa4918 (diff) | |
download | scala-eb2a2e931007589af2d65b466ded47e2fad14ada.tar.gz scala-eb2a2e931007589af2d65b466ded47e2fad14ada.tar.bz2 scala-eb2a2e931007589af2d65b466ded47e2fad14ada.zip |
- Added atree/AConstant.java
Diffstat (limited to 'sources/scalac/atree/AConstant.java')
-rw-r--r-- | sources/scalac/atree/AConstant.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/sources/scalac/atree/AConstant.java b/sources/scalac/atree/AConstant.java new file mode 100644 index 0000000000..626ab2a5da --- /dev/null +++ b/sources/scalac/atree/AConstant.java @@ -0,0 +1,39 @@ +/* ____ ____ ____ ____ ______ *\ +** / __// __ \/ __// __ \/ ____/ SOcos COmpiles Scala ** +** __\_ \/ /_/ / /__/ /_/ /\_ \ (c) 2002, LAMP/EPFL ** +** /_____/\____/\___/\____/____/ ** +\* */ + +// $Id$ + +package scalac.atree; + +/** This class represents a constant. */ +public class AConstant { + + //######################################################################## + // Public Cases + + public case UNIT; + public case BOOLEAN(boolean value); + public case BYTE(byte value); + public case SHORT(short value); + public case CHAR(char value); + public case INT(int value); + public case LONG(long value); + public case FLOAT(float value); + public case DOUBLE(double value); + public case STRING(String value); + public case NULL; + public case ZERO; + + //######################################################################## + // Public Methods + + /** Returns a string representation of this constant. */ + public String toString() { + return new ATreePrinter().printConstant(this).toString(); + } + + //######################################################################## +} |