diff options
author | paltherr <paltherr@epfl.ch> | 2003-11-05 14:32:27 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-11-05 14:32:27 +0000 |
commit | 263b33d07e7416b48228fff7fbb680e3be9468a3 (patch) | |
tree | 09abcaa50340fbd736a0e903158182a1df068681 /sources/scalac/atree/AShiftOp.java | |
parent | ca1fb5b2eaffd9bd183012f8ef57c249f56e0c9a (diff) | |
download | scala-263b33d07e7416b48228fff7fbb680e3be9468a3.tar.gz scala-263b33d07e7416b48228fff7fbb680e3be9468a3.tar.bz2 scala-263b33d07e7416b48228fff7fbb680e3be9468a3.zip |
- Added atree/AArithmeticOp.java
- Added atree/AComparisonOp.java
- Added atree/ALogicalOp.java
- Added atree/AShiftOp.java
- Added atree/ATestOp.java
- Added atree/ATypeKind.java
Diffstat (limited to 'sources/scalac/atree/AShiftOp.java')
-rw-r--r-- | sources/scalac/atree/AShiftOp.java | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/sources/scalac/atree/AShiftOp.java b/sources/scalac/atree/AShiftOp.java new file mode 100644 index 0000000000..102f7963bd --- /dev/null +++ b/sources/scalac/atree/AShiftOp.java @@ -0,0 +1,42 @@ +/* ____ ____ ____ ____ ______ *\ +** / __// __ \/ __// __ \/ ____/ SOcos COmpiles Scala ** +** __\_ \/ /_/ / /__/ /_/ /\_ \ (c) 2002, LAMP/EPFL ** +** /_____/\____/\___/\____/____/ ** +\* */ + +// $Id$ + +package scalac.atree; + +import scalac.util.Debug; + +/** This class represents a shift operation. */ +public class AShiftOp { + + //######################################################################## + // Public Cases + + /** A logical shift to the left */ + public case LSL; + + /** A logical shift to the right */ + public case LSR; + + /** An arithmetic shift to the right */ + public case ASR; + + //######################################################################## + // Public Methods + + /** Returns a string representation of this operation. */ + public String toString() { + switch (this) { + case LSL: return "LSL"; + case LSR: return "LSR"; + case ASR: return "ASR"; + default: throw Debug.abort("unknown case", this); + } + } + + //######################################################################## +} |