private BoundExpression BindUnaryExpression(UnaryExpressionSyntax syntax) { var boundExpresion = BindExpression(syntax.Expression); var op = BoundUnaryOperator.Bind(syntax.OperatorToken.Kind, boundExpresion.ReturnType); if (op == null) { _diagnostics.Add(Diagnostic.Create(DiagnosticDescriptors.UndefinedUnaryOperator, syntax.OperatorToken.Location, syntax.OperatorToken.ValueText, boundExpresion.ReturnType)); return(boundExpresion); } return(new BoundUnaryExpresion(op, boundExpresion)); }
internal BoundUnaryExpresion(BoundUnaryOperator op, BoundExpression expression) { Op = op; Expression = expression; }