object IScriptCustomType.EvaluateUnaryExpression(ScriptUnaryExpression expression) { throw new ScriptRuntimeException(expression.Span, $"Operator [{expression.Operator}] is not supported for an array"); }
object IScriptCustomType.EvaluateUnaryExpression(ScriptUnaryExpression expression) { throw new ScriptRuntimeException(expression.Span, $"Operator [{expression.Operator}] is not supported for date"); }
object IScriptCustomType.EvaluateUnaryExpression(ScriptUnaryExpression expression) { switch (expression.Operator) { case ScriptUnaryOperator.Negate: return (ScriptTimeSpan)value.Negate(); case ScriptUnaryOperator.Not: return value == TimeSpan.Zero; default: throw new ScriptRuntimeException(expression.Span, $"Operator [{expression.Operator}] is not supported for timespan"); } }