home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / VPage / Java.bin / CLASSES.ZIP / sun / tools / tree / BinaryShiftExpression.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-07-08  |  1.3 KB  |  28 lines

  1. package sun.tools.tree;
  2.  
  3. import sun.tools.java.Environment;
  4. import sun.tools.java.Type;
  5.  
  6. public class BinaryShiftExpression extends BinaryExpression {
  7.    public BinaryShiftExpression(int var1, int var2, Expression var3, Expression var4) {
  8.       super(var1, var2, var3.type, var3, var4);
  9.    }
  10.  
  11.    void selectType(Environment var1, Context var2, int var3) {
  12.       if (super.left.type == Type.tLong) {
  13.          super.type = Type.tLong;
  14.       } else if (super.left.type.inMask(62)) {
  15.          super.type = Type.tInt;
  16.          super.left = ((Node)this).convert(var1, var2, super.type, super.left);
  17.       } else {
  18.          super.type = Type.tError;
  19.       }
  20.  
  21.       if (super.right.type.inMask(62)) {
  22.          super.right = new ConvertExpression(super.where, Type.tInt, super.right);
  23.       } else {
  24.          super.right = ((Node)this).convert(var1, var2, Type.tInt, super.right);
  25.       }
  26.    }
  27. }
  28.