int op = expr.getOp(); if (op == ExprUnary.UNOP_PREINC || op == ExprUnary.UNOP_PREDEC || op == ExprUnary.UNOP_POSTINC || op == ExprUnary.UNOP_POSTDEC) {     FEContext ctx = expr.getContext(); Expression lhs = expr.getExpr(); int bop = ExprBinary.BINOP_ADD; if (op == ExprUnary.UNOP_PREDEC || op == ExprUnary.UNOP_POSTDEC) bop = ExprBinary.BINOP_SUB; Expression rhs = new ExprBinary(ctx, bop, lhs, new ExprConstInt(ctx, 1)); Statement assign = new StmtAssign(ctx, lhs, rhs, 0); if (op == ExprUnary.UNOP_PREINC || op == ExprUnary.UNOP_PREDEC) addStatement(assign); else successors.add(assign); return lhs; }
    public Object visitExprUnary(ExprUnary expr)    {        // Does this modify its argument?        int op = expr.getOp();        if (op == ExprUnary.UNOP_PREINC || op == ExprUnary.UNOP_PREDEC ||            op == ExprUnary.UNOP_POSTINC || op == ExprUnary.UNOP_POSTDEC)        {            // Insert a statement: a = a + 1.            // Assume that the child expression of expr is a valid            // left-hand side; it can usefully be a field, array            // reference, or local variable.            FEContext ctx = expr.getContext();            Expression lhs = expr.getExpr();            int bop = ExprBinary.BINOP_ADD;            if (op == ExprUnary.UNOP_PREDEC || op == ExprUnary.UNOP_POSTDEC)                bop = ExprBinary.BINOP_SUB;            Expression rhs =                new ExprBinary(ctx, bop, lhs, new ExprConstInt(ctx, 1));            Statement assign = new StmtAssign(ctx, lhs, rhs, 0);            if (op == ExprUnary.UNOP_PREINC || op == ExprUnary.UNOP_PREDEC)                addStatement(assign);            else                successors.add(assign);            return lhs;        }        return expr;    }