private BoundExpression BindUnaryExpression(UnaryExpressionSyntax syntax) { var boundOperand = BindCore(syntax.Operand); var boundOperator = BoundUnaryOperator.Bind(syntax.OperatorToken.Kind, boundOperand.Type); if (boundOperator == null) { Diagnostics.ReportUndefinedUnaryOperator(syntax.OperatorToken.InnerToken.Span, syntax.OperatorToken.InnerToken.Span.ToStringValue(), boundOperand.Type); return(boundOperand); } return(new BoundUnaryExpression(boundOperator, boundOperand)); }
public BoundUnaryExpression(BoundUnaryOperator op, BoundExpression operand) { Op = op; Operand = operand; }