public void atCondExpr(CondExpr expr) throws CompileError { booleanExpr(expr.condExpr()); expr.thenExpr().accept(this); int type1 = exprType; int dim1 = arrayDim; String cname1 = className; expr.elseExpr().accept(this); if (dim1 == 0 && dim1 == arrayDim) if (CodeGen.rightIsStrong(type1, exprType)) expr.setThen(new CastExpr(exprType, 0, expr.thenExpr())); else if (CodeGen.rightIsStrong(exprType, type1)) { expr.setElse(new CastExpr(type1, 0, expr.elseExpr())); exprType = type1; } }
@Override public void atCondExpr(CondExpr expr) throws CompileError { booleanExpr(expr.condExpr()); expr.thenExpr().accept(this); int type1 = exprType; int dim1 = arrayDim; @SuppressWarnings("unused") String cname1 = className; expr.elseExpr().accept(this); if (dim1 == 0 && dim1 == arrayDim) if (CodeGen.rightIsStrong(type1, exprType)) expr.setThen(new CastExpr(exprType, 0, expr.thenExpr())); else if (CodeGen.rightIsStrong(exprType, type1)) { expr.setElse(new CastExpr(type1, 0, expr.elseExpr())); exprType = type1; } }
public void atCondExpr(CondExpr expr) throws CompileError { booleanExpr(expr.condExpr()); expr.thenExpr().accept(this); int type1 = exprType; int dim1 = arrayDim; String cname1 = className; expr.elseExpr().accept(this); if (dim1 == 0 && dim1 == arrayDim) if (CodeGen.rightIsStrong(type1, exprType)) expr.setThen(new CastExpr(exprType, 0, expr.thenExpr())); else if (CodeGen.rightIsStrong(exprType, type1)) { expr.setElse(new CastExpr(type1, 0, expr.elseExpr())); exprType = type1; } }
public void atCondExpr(CondExpr expr) throws CompileError { booleanExpr(expr.condExpr()); expr.thenExpr().accept(this); int type1 = exprType; int dim1 = arrayDim; String cname1 = className; expr.elseExpr().accept(this); if (dim1 == 0 && dim1 == arrayDim) if (CodeGen.rightIsStrong(type1, exprType)) expr.setThen(new CastExpr(exprType, 0, expr.thenExpr())); else if (CodeGen.rightIsStrong(exprType, type1)) { expr.setElse(new CastExpr(type1, 0, expr.elseExpr())); exprType = type1; } }
public void atCondExpr(CondExpr expr) throws CompileError { booleanExpr(expr.condExpr()); expr.thenExpr().accept(this); int type1 = exprType; int dim1 = arrayDim; String cname1 = className; expr.elseExpr().accept(this); if (dim1 == 0 && dim1 == arrayDim) if (CodeGen.rightIsStrong(type1, exprType)) expr.setThen(new CastExpr(exprType, 0, expr.thenExpr())); else if (CodeGen.rightIsStrong(exprType, type1)) { expr.setElse(new CastExpr(type1, 0, expr.elseExpr())); exprType = type1; } }
public void atCondExpr(CondExpr expr) throws CompileError { booleanExpr(expr.condExpr()); expr.thenExpr().accept(this); int type1 = exprType; int dim1 = arrayDim; String cname1 = className; expr.elseExpr().accept(this); if (dim1 == 0 && dim1 == arrayDim) if (CodeGen.rightIsStrong(type1, exprType)) expr.setThen(new CastExpr(exprType, 0, expr.thenExpr())); else if (CodeGen.rightIsStrong(exprType, type1)) { expr.setElse(new CastExpr(type1, 0, expr.elseExpr())); exprType = type1; } }
public void atCondExpr(CondExpr expr) throws CompileError { booleanExpr(expr.condExpr()); expr.thenExpr().accept(this); int type1 = exprType; int dim1 = arrayDim; String cname1 = className; expr.elseExpr().accept(this); if (dim1 == 0 && dim1 == arrayDim) if (CodeGen.rightIsStrong(type1, exprType)) expr.setThen(new CastExpr(exprType, 0, expr.thenExpr())); else if (CodeGen.rightIsStrong(exprType, type1)) { expr.setElse(new CastExpr(type1, 0, expr.elseExpr())); exprType = type1; } }