private object ExecuteUnary(object operand, Token op, ExecutionContext context) { if (op.Is(TokenId.TypeToken)) { return(this.ExecuteConversion(operand, op)); } switch (op.TokenText) { case "-": return(ParserOps.PolyMinus(context, op, (object)0, operand)); case "+": return(ParserOps.PolyAdd(context, op, (object)0, operand)); case "!": case "-not": return((object)!LanguagePrimitives.IsTrue(operand)); case "-bnot": try { return((object)~Parser.ConvertTo <int>(operand, op)); } catch (Exception ex) { CommandProcessorBase.CheckForSevereException(ex); return((object)~Parser.ConvertTo <long>(operand, op)); } case ",": return((object)new object[1] { operand }); case "-split": return(ParserOps.SplitOperator(context, op, operand)); case "-join": return(ParserOps.JoinOperator(context, op, operand)); default: throw InterpreterError.NewInterpreterException((object)op, typeof(RuntimeException), op, "UnexpectedUnaryOperator", (object)op); } }