@Override
public void visit(AssignmentExpression assignmentExpression) {
Node leftSide = assignmentExpression.getExpression(0);
Node rightSide = assignmentExpression.getExpression(1);
Variable leftVar = null;
Variable rightVar = null;
VariableDeclaration leftDeclaration = null;
if (leftSide instanceof Name) {
Name leftName = (Name) leftSide;
leftDeclaration = leftName.lookupVariable(leftName.getIdentifier());
leftVar = new Variable(leftDeclaration.getName(),
CppType.fromName(leftDeclaration.getType()), false, false);
}
if (rightSide instanceof Name) {
Name rightName = (Name) rightSide;
VariableDeclaration declaration = rightName.lookupVariable(
rightName.getIdentifier());
rightVar = new Variable(declaration.getName(),
CppType.fromName(declaration.getType()), false, false);
}
if (leftVar != null && rightVar != null) {
Node leftParent = leftDeclaration.getParent();
if (leftParent instanceof ClassDeclaration) {