다음을 통해 공유


ArrayLiteralAst Class

Definition

The ast that represents an array literal expression, e.g. 1,2,3. An array expression, e.g. @(dir), is represented by ArrayExpressionAst. An array literal expression can be constructed from a single element, as happens with the unary comma operator, e.g. ,4.

public ref class ArrayLiteralAst : System::Management::Automation::Language::ExpressionAst
public class ArrayLiteralAst : System.Management.Automation.Language.ExpressionAst
type ArrayLiteralAst = class
    inherit ExpressionAst
Public Class ArrayLiteralAst
Inherits ExpressionAst
Inheritance

Constructors

ArrayLiteralAst(IScriptExtent, IList<ExpressionAst>)

Construct an array literal expression.

Properties

Elements

The non-empty collection of asts of the elements of the array.

Extent

The extent in the source this ast represents.

(Inherited from Ast)
Parent

The parent tree for this node.

(Inherited from Ast)
StaticType

The result of an ArrayLiteralAst is always typeof(object[]).

Methods

Copy()

Copy the ArrayLiteralAst instance.

Find(Func<Ast,Boolean>, Boolean)

Traverse the entire Ast, returning the first node in the tree for which predicate returns true.

(Inherited from Ast)
FindAll(Func<Ast,Boolean>, Boolean)

Traverse the entire Ast, returning all nodes in the tree for which predicate returns true.

(Inherited from Ast)
SafeGetValue()

Constructs the resultant object from the AST and returns it if it is safe.

(Inherited from Ast)
SafeGetValue(Boolean)

Constructs the resultant object from the AST and returns it if it is safe.

(Inherited from Ast)
ToString()

Formats the ast and returns a string.

(Inherited from Ast)
Visit(AstVisitor)

Visit each node in the Ast, calling the methods in astVisitor for each node in the ast.

(Inherited from Ast)
Visit(ICustomAstVisitor)

Visit the Ast using a visitor that can choose how the tree traversal is performed. This visit method is for advanced uses of the visitor pattern where an AstVisitor is insufficient.

(Inherited from Ast)

Applies to