Freigeben über


BinaryExpressionAst Class

Definition

The ast representing a binary expression, e.g. $a + $b.

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

Constructors

BinaryExpressionAst(IScriptExtent, ExpressionAst, TokenKind, ExpressionAst, IScriptExtent)

Initializes a new instance of the binary expression.

Properties

ErrorPosition

The position to report an error if an error occurs at runtime. The property is never null.

Extent

The extent in the source this ast represents.

(Inherited from Ast)
Left

The ast for the left hand side of the binary expression. The property is never null.

Operator

The operator token kind. The value returned is always a binary operator.

Parent

The parent tree for this node.

(Inherited from Ast)
Right

The ast for the right hand side of the binary expression. The property is never null.

StaticType

The result type of the operation. For most binary operators, the type is unknown until runtime, but xor always results in typeof(bool).

Methods

Copy()

Copy the BinaryExpressionAst 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