PowerShellVariableExpressionSyntax Class

Represents a variable reference such as $name, ${name}, $env:PATH, or a splat @name.

public sealed class PowerShellVariableExpressionSyntax : ShellExpressionSyntax
Inheritance
ShellExpressionSyntax PowerShellVariableExpressionSyntax

Properties

NameDescription
IsSplattedReturns true for a splatted variable, @name.
NameThe variable name without the sigil or braces.
NameToken
SigilToken

Returns true for a splatted variable, @name.

public bool IsSplatted { get; }

Property value

bool

The variable name without the sigil or braces.

public string Name { get; }

Property value

string

NameToken

Syntax.g.cs
public SyntaxToken NameToken { get; }

Property value

SyntaxToken

No documentation is available.

SigilToken

Syntax.g.cs
public SyntaxToken SigilToken { get; }

Property value

SyntaxToken

No documentation is available.

Methods

NameDescription
Accept(ShellSyntaxVisitor)
Accept<TResult>(ShellSyntaxVisitor<TResult>)
Update(SyntaxToken, SyntaxToken)Returns this node with the given parts, or itself when nothing changed.
WithNameToken(SyntaxToken)Returns this node with nameToken in place of its PowerShellVariableExpressionSyntax.NameToken.
WithSigilToken(SyntaxToken)Returns this node with sigilToken in place of its PowerShellVariableExpressionSyntax.SigilToken.

Accept overloads

Accept(ShellSyntaxVisitor)

Syntax.g.cs
public override void Accept(ShellSyntaxVisitor visitor)
Parameters
visitor ShellSyntaxVisitor

No documentation is available.

Accept<TResult>(ShellSyntaxVisitor<TResult>)

Syntax.g.cs
public override TResult? Accept<TResult>(ShellSyntaxVisitor<TResult> visitor)
Type parameters
TResult
Parameters
visitor ShellSyntaxVisitor<TResult>
Returns

TResult?

No documentation is available.

Update(SyntaxToken, SyntaxToken)

Syntax.g.cs

Returns this node with the given parts, or itself when nothing changed.

public PowerShellVariableExpressionSyntax Update(SyntaxToken sigilToken, SyntaxToken nameToken)

Parameters

sigilToken SyntaxToken
nameToken SyntaxToken

Returns

PowerShellVariableExpressionSyntax

WithNameToken(SyntaxToken)

Syntax.g.cs

Returns this node with nameToken in place of its PowerShellVariableExpressionSyntax.NameToken.

public PowerShellVariableExpressionSyntax WithNameToken(SyntaxToken nameToken)

WithSigilToken(SyntaxToken)

Syntax.g.cs

Returns this node with sigilToken in place of its PowerShellVariableExpressionSyntax.SigilToken.

public PowerShellVariableExpressionSyntax WithSigilToken(SyntaxToken sigilToken)