Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NameExpression"/> class.
        /// </summary>
        /// <param name="identifier">The name of the referenced expression.</param>
        public NameExpression(Identifier identifier)
        {
            if (identifier == null)
            {
                throw new ArgumentNullException(nameof(identifier));
            }

            this.Identifier = identifier;
        }
Ejemplo n.º 2
0
        public Rule(Identifier identifier, Expression expression, IEnumerable<Identifier> flags)
        {
            if (expression == null)
            {
                throw new ArgumentNullException("expression");
            }

            this.identifier = identifier;
            this.expression = expression;
            this.flags = flags.ToList().AsReadOnly();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PrefixedExpression"/> class.
        /// </summary>
        /// <param name="prefix">The name given to this expression as a prefix.</param>
        /// <param name="expression">The expression that has been prefixed.</param>
        public PrefixedExpression(Identifier prefix, Expression expression)
        {
            if (prefix == null)
            {
                throw new ArgumentNullException(nameof(prefix));
            }

            if (expression == null)
            {
                throw new ArgumentNullException(nameof(expression));
            }

            this.Prefix = prefix;
            this.Expression = expression;
        }
Ejemplo n.º 4
0
        public Rule(Identifier identifier, Expression expression, IEnumerable<Identifier> flags)
        {
            if (identifier == null)
            {
                throw new ArgumentNullException(nameof(identifier));
            }

            if (expression == null)
            {
                throw new ArgumentNullException(nameof(expression));
            }

            this.Identifier = identifier;
            this.Expression = expression;
            this.Flags = (flags ?? Enumerable.Empty<Identifier>()).ToList().AsReadOnly();
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PrefixedExpression"/> class.
 /// </summary>
 /// <param name="prefix">The name given to this expression as a prefix.</param>
 /// <param name="expression">The expression that has been prefixed.</param>
 public PrefixedExpression(Identifier prefix, Expression expression)
 {
     this.Prefix     = prefix ?? throw new ArgumentNullException(nameof(prefix));
     this.Expression = expression ?? throw new ArgumentNullException(nameof(expression));
 }