Ejemplo n.º 1
0
        private BoundExpression BindUnaryExpression(UnaryExpressionSyntax syntax)
        {
            var operand = BindExpression(syntax.Operand);
            var op      = BoundUnaryOperator.Bind(syntax.OperatorToken.Kind, operand.Type);

            if (op == null)
            {
                Diagnostics.ReportUndefinedUnaryOperator(syntax.OperatorToken, operand.Type);
                return(operand);
            }


            return(new BoundUnaryExpression(op, operand));
        }
Ejemplo n.º 2
0
 public BoundUnaryExpression(BoundUnaryOperator op, BoundExpression operand)
 {
     Operator = op;
     Operand  = operand;
 }