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 / BinaryArithmeticExpression.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-07-08  |  1.2 KB  |  26 lines

  1. package sun.tools.tree;
  2.  
  3. import sun.tools.java.Environment;
  4. import sun.tools.java.Type;
  5.  
  6. public class BinaryArithmeticExpression extends BinaryExpression {
  7.    public BinaryArithmeticExpression(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 ((var3 & 128) != 0) {
  13.          super.type = Type.tDouble;
  14.       } else if ((var3 & 64) != 0) {
  15.          super.type = Type.tFloat;
  16.       } else if ((var3 & 32) != 0) {
  17.          super.type = Type.tLong;
  18.       } else {
  19.          super.type = Type.tInt;
  20.       }
  21.  
  22.       super.left = ((Node)this).convert(var1, var2, super.type, super.left);
  23.       super.right = ((Node)this).convert(var1, var2, super.type, super.right);
  24.    }
  25. }
  26.