/// <summary> /// Initialize an new instance of the <see cref="ArrayIndexerExpression"/> class using the specified target and parameters. /// </summary> /// <param name="target">The expression of the target object of the array indexer.</param> /// <param name="indices">The expressions of the parameters of the array indexer.</param> /// <param name="linePragma">The position of the expression in the script code.</param> /// <exception cref="ArgumentNullException">The parameter is <see langword="null"/>.</exception> public ArrayIndexerExpression(LinePragma linePragma, Expression target, ExpressionCollection indices) : base(linePragma) { if (target == null || indices == null) { throw new ArgumentNullException(); } Target = target; Indices = indices; }
/// <summary> /// Initialize a new instance of the <see cref="NewExpression"/> class using the specified parameters. /// </summary> /// <param name="type">The expression of the type of the object to be created.</param> /// <param name="parameters">The expressions of the parameters for the constructor invocation.</param> /// <param name="linePragma">The position of the expression in the script code.</param> /// <exception cref="ArgumentNullException"><paramref name="linePragma"/> or <paramref name="type"/> is <see langword="null"/>.</exception> public NewExpression(Parser.Lexical.LinePragma linePragma, Expression type, ExpressionCollection parameters) : base(linePragma) { if (type == null) { throw new ArgumentNullException(); } Type = type; Parameters = parameters; }
/// <summary> /// Initialize a new instance of the <see cref="FunctionInvokeExpression"/> class using the specified parameters. /// </summary> /// <param name="target">The expression of the target function.</param> /// <param name="parameters">The expressions of the parameters for the function invocation.</param> /// <param name="linePragma">The position of the expression in the script code.</param> /// <exception cref="ArgumentNullException"><paramref name="linePragma"/> is<see langword="null"/>, or <paramref name="target"/> is <see langword="null"/>.</exception> public FunctionInvokeExpression( Parser.Lexical.LinePragma linePragma, Expression target, ExpressionCollection parameters) : base(linePragma) { if (target == null) { throw new ArgumentNullException(); } Target = target; Parameters = parameters; }
/// <summary> /// Initializes a new instance of the <see cref="ArrayExpression"/> class using the specified parameters. /// </summary> /// <param name="items">The collection that contains the expressions of the elements in the array.</param> /// <param name="linePragma">The position of the expression in the script code.</param> /// <exception cref="ArgumentNullException"><paramref name="linePragma"/> is <see langword="null"/>.</exception> public ArrayExpression(LinePragma linePragma, ExpressionCollection items) : base(linePragma) { Items = items; }