Пример #1
0
 /// <summary>
 /// Creates a unary operation.
 /// </summary>
 /// <typeparam name="TOperator">The type of the operator.</typeparam>
 /// <typeparam name="TExpression">The type of the expression.</typeparam>
 /// <param name="op">The operator.</param>
 /// <param name="transformation">The transformation.</param>
 /// <returns>A unary operation.</returns>
 public static IOperation <TOperator, TExpression> Post <TOperator, TExpression>(IParser <TOperator> op, UnaryOperatorTransform <TExpression> transformation)
 => Post(op, transformation.ExpandTransform <TOperator, TExpression>());
Пример #2
0
 /// <summary>
 /// Creates a unary operation.
 /// </summary>
 /// <typeparam name="TOperator">The type of the operator.</typeparam>
 /// <typeparam name="TExpression">The type of the expression.</typeparam>
 /// <param name="op">The operator.</param>
 /// <param name="transformation">The transformation.</param>
 /// <returns>A unary operation.</returns>
 public static IOperation <TOperator, TExpression> Post <TOperator, TExpression>(IParser <TOperator> op, UnaryOperatorTransform <TOperator, TExpression> transformation)
 => SingleUnary(Associativity.Left, op, transformation);