result = new NamespaceAccessExpressionNode(qualifier, op, right);
}
else if (left instanceof MemberAccessExpressionNode)
{
// In this case, we need to turn the right side into the full qualified bit.
IExpressionNode maRight = ((MemberAccessExpressionNode)left).getRightOperandNode();
if (maRight instanceof NamespaceIdentifierNode)
{
((MemberAccessExpressionNode)left).setRightOperandNode(new NamespaceAccessExpressionNode((NamespaceIdentifierNode)maRight, op, right));
}
else if (maRight instanceof IdentifierNode)
{
((MemberAccessExpressionNode)left).setRightOperandNode(new NamespaceAccessExpressionNode(new NamespaceIdentifierNode((IdentifierNode)maRight), op, right));
//this is the @ case, so @x::y
}
else if (maRight instanceof UnaryOperatorNodeBase && ((UnaryOperatorNodeBase)maRight).getOperator() == OperatorType.AT)
{
((UnaryOperatorNodeBase)maRight).setExpression(new NamespaceAccessExpressionNode((IdentifierNode)((UnaryOperatorNodeBase)maRight).getOperandNode(), op, right));
}
if (maRight.hasParenthesis() && maRight instanceof MemberAccessExpressionNode)
{
((MemberAccessExpressionNode)left).setRightOperandNode(new NamespaceAccessExpressionNode(new QualifiedNamespaceExpressionNode((MemberAccessExpressionNode)maRight), op, right));
}
result = left;
}