/// <summary> /// Initializes a new instance of the <see cref="Expression"/> class. /// </summary> /// <param name="flowSymbols">The flow symbols.</param> /// <param name="comparer">The symbol and identifier comparer.</param> /// <exception cref="ArgumentNullException">Argument <paramref name="flowSymbols"/> or <paramref name="comparer"/> is <c>null</c>.</exception> public Expression([NotNull] ExpressionFlowSymbols flowSymbols, [NotNull] IEqualityComparer <string> comparer) { Expect.NotNull(nameof(comparer), comparer); Expect.NotNull(nameof(flowSymbols), flowSymbols); FlowSymbols = flowSymbols; _unaryOperatorSymbols = new Dictionary <string, UnaryOperator>(comparer); _binaryOperatorSymbols = new Dictionary <string, BinaryOperator>(comparer); _registeredOperators = new List <Operator>(); Comparer = comparer; }
/// <summary> /// Initializes static members of the <see cref="ExpressionFlowSymbols"/> class. /// </summary> static ExpressionFlowSymbols() { Default = new ExpressionFlowSymbols(",", ".", "(", ")"); }