private BoundExpression BindUnaryExpression(UnaryExpressionSyntax expressionSyntax) { var boundOperand = BindExpression(expressionSyntax.Operand); var boundOperator = BoundUnaryOperator.Bind(expressionSyntax.OperatorToken.Kind, boundOperand.Type); if (boundOperator == null) { _diagnostics.ReportUndefinedUnaryOperator(expressionSyntax.OperatorToken.Span, expressionSyntax.OperatorToken.Text, boundOperand.Type); return(boundOperand); } return(new BoundUnaryExpression(boundOperator, boundOperand)); }
public BoundUnaryExpression(BoundUnaryOperator operatorUnit, BoundExpression operand) { OperatorUnit = operatorUnit; Operand = operand; }