@Override
@SuppressWarnings("ConstantConditions")
public GoExpr getReceiveExpression() {
GoExpr expr = findChildByClass(GoExpr.class);
if (expr != null)
return expr;
GoAssignmentStatement assignmentStatement = getAssignment();
if (assignmentStatement != null) {
GoExpressionList expressionList = assignmentStatement.getRightSideExpressions();
if (expressionList.getExpressions() != null && expressionList.getExpressions().length > 0)
return expressionList.getExpressions()[0];
return expr;
}
GoShortVarDeclaration declaration = getShortVarDeclaration();
if (declaration != null) {
GoExpr expressions[] = declaration.getExpressions();
if (expressions.length > 0)
return expressions[0];
}
return expr;