AssignmentStatementAst Class

Definition

The ast that represents an assignment statement, e.g. $x = 42.

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

Constructors

AssignmentStatementAst(IScriptExtent, ExpressionAst, TokenKind, StatementAst, IScriptExtent)

Construct an assignment statement.

Properties

ErrorPosition

The position to report at runtime if there is an error during assignment. This property is never null.

Extent

The extent in the source this ast represents.

(Inherited from Ast)
Left

The ast for the location being assigned. This property is never null.

Operator

The operator for token assignment (such as =, +=, -=, etc.). The value is always some assignment operator.

Parent

The parent tree for this node.

(Inherited from Ast)
Right

The ast for the value to assign. This property is never null.

Methods

Copy()

Copy the AssignmentStatementAst 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)
GetAssignmentTargets()

Return all of the expressions assigned by the assignment statement. Typically it's just a variable expression, but if Left is an ArrayLiteralAst, then all of the elements are assigned.

GetPureExpression()

If the pipeline represents a pure expression, the expression is returned, otherwise null is returned.

(Inherited from PipelineBaseAst)
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