IASTUnaryExpression unOperand1 = (IASTUnaryExpression)operand1;
operand1 = unOperand1.getOperand();
}
if(operand1 instanceof IASTIdExpression){
Statement stmt = new Statement(new Assignment (operand1.getRawSignature(),rhs));
if(inElse) parent.Enclose(stmt, true);
else parent.Enclose(stmt, false);
}
else if (operand1 instanceof IASTArraySubscriptExpression) {
ArrayAccessVisitor aVisitor = new ArrayAccessVisitor();
operand1.accept(aVisitor);
List<Expression> flist = aVisitor.indices;
Collections.reverse(flist);
Statement stmt = new Statement(new Assignment (aVisitor.id, new FADA_Index(flist), rhs));
if(inElse) parent.Enclose(stmt, true);
else parent.Enclose(stmt, false);
} else {
//bexpr.getOperand1().accept(lhsVisitor);
//FadaExpression lhs = lhsVisitor.getExpr();
System.err.println("StmtVisitor.visit: unknown binary operand " + bexpr.getOperand1() + " " + expr.getRawSignature());
}
} else {
System.err.println("StmtVisitor.visit: unknown binary expression " + expr.getRawSignature());
}
} else if(expr instanceof IASTUnaryExpression){
visit((IASTUnaryExpression)expr);
} else if (expr instanceof IASTFunctionCallExpression){
ExprVisitor visitor = new ExprVisitor();
expr.accept(visitor);
Statement stmt = new Statement(new Assignment ("", visitor.getExpr()));
if(inElse) parent.Enclose(stmt, true);
else parent.Enclose(stmt, false);
} else {
System.err.println("StmtVisitor.visit: unknown expression (" + expr.getClass() + ") " + expr.getRawSignature() );
}