Example #1
0
 public UnaryOpExpr(ParserRuleContext sourceLocation, UnaryOpType operation, IPExpr subExpr)
 {
     SourceLocation = sourceLocation;
     Operation      = operation;
     SubExpr        = subExpr;
     Type           = subExpr.Type;
 }
Example #2
0
        private string WriteUnOp(UnaryOpType operation)
        {
            switch (operation)
            {
            case UnaryOpType.Negate:
                return("-");

            case UnaryOpType.Not:
                return("!");

            default:
                throw new ArgumentOutOfRangeException(nameof(operation), operation, null);
            }
        }
Example #3
0
 internal QueryUnaryExpression(IExpression argument, UnaryOpType type)
 {
     _argument = argument;
     _type     = type;
 }
 internal QueryUnaryExpression([NotNull] IExpression argument, UnaryOpType type)
 {
     Debug.Assert(argument != null);
     _argument = argument;
     _type     = type;
 }