CmdSetStatementSyntax Class

Represents a set statement, including its /a and /p forms.

public sealed class CmdSetStatementSyntax : ShellStatementSyntax
Inheritance
ShellStatementSyntax CmdSetStatementSyntax

Properties

NameDescription
EqualsToken
IsArithmeticReturns true for set /a, which evaluates its value arithmetically.
IsPromptReturns true for set /p, which prompts the user.
NameThe variable name, or an empty string when the statement has no name.
NameToken
Redirections
SetKeyword
SwitchToken
Value

EqualsToken

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

Property value

SyntaxToken

No documentation is available.

Returns true for set /a, which evaluates its value arithmetically.

public bool IsArithmetic { get; }

Property value

bool

Returns true for set /p, which prompts the user.

public bool IsPrompt { get; }

Property value

bool

The variable name, or an empty string when the statement has no name.

public string Name { get; }

Property value

string

NameToken

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

Property value

SyntaxToken

No documentation is available.

Redirections

Syntax.g.cs
public SyntaxList<ShellRedirectionSyntax> Redirections { get; }

No documentation is available.

SetKeyword

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

Property value

SyntaxToken

No documentation is available.

SwitchToken

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

Property value

SyntaxToken

No documentation is available.

public ShellWordSyntax? Value { get; }

Property value

ShellWordSyntax?

No documentation is available.

Methods

NameDescription
Accept(ShellSyntaxVisitor)
Accept<TResult>(ShellSyntaxVisitor<TResult>)
Update(SyntaxToken, SyntaxToken, SyntaxToken, SyntaxToken, ShellWordSyntax?)The signature of version 3.0.0, from before CmdSetStatementSyntax.Redirections was added; the redirections are kept.
Update(SyntaxToken, SyntaxToken, SyntaxToken, SyntaxToken, ShellWordSyntax?, SyntaxList<ShellRedirectionSyntax>)Returns this node with the given parts, or itself when nothing changed.
WithEqualsToken(SyntaxToken)Returns this node with equalsToken in place of its CmdSetStatementSyntax.EqualsToken.
WithNameToken(SyntaxToken)Returns this node with nameToken in place of its CmdSetStatementSyntax.NameToken.
WithRedirections(SyntaxList<ShellRedirectionSyntax>)Returns this node with redirections in place of its CmdSetStatementSyntax.Redirections.
WithSetKeyword(SyntaxToken)Returns this node with setKeyword in place of its CmdSetStatementSyntax.SetKeyword.
WithSwitchToken(SyntaxToken)Returns this node with switchToken in place of its CmdSetStatementSyntax.SwitchToken.
WithValue(ShellWordSyntax?)Returns this node with value in place of its CmdSetStatementSyntax.Value.

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 overloads

Update(SyntaxToken, SyntaxToken, SyntaxToken, SyntaxToken, ShellWordSyntax?)

CmdSetStatementSyntax.cs

The signature of version 3.0.0, from before CmdSetStatementSyntax.Redirections was added; the redirections are kept.

public CmdSetStatementSyntax Update(SyntaxToken setKeyword, SyntaxToken switchToken, SyntaxToken nameToken, SyntaxToken equalsToken, ShellWordSyntax? value)
Parameters
setKeyword SyntaxToken
switchToken SyntaxToken
nameToken SyntaxToken
equalsToken SyntaxToken
value ShellWordSyntax?
Returns

CmdSetStatementSyntax

Update(SyntaxToken, SyntaxToken, SyntaxToken, SyntaxToken, ShellWordSyntax?, SyntaxList<ShellRedirectionSyntax>)

Syntax.g.cs

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

public CmdSetStatementSyntax Update(SyntaxToken setKeyword, SyntaxToken switchToken, SyntaxToken nameToken, SyntaxToken equalsToken, ShellWordSyntax? value, SyntaxList<ShellRedirectionSyntax> redirections)
Parameters
setKeyword SyntaxToken
switchToken SyntaxToken
nameToken SyntaxToken
equalsToken SyntaxToken
value ShellWordSyntax?
redirections SyntaxList<ShellRedirectionSyntax>
Returns

CmdSetStatementSyntax

WithEqualsToken(SyntaxToken)

Syntax.g.cs

Returns this node with equalsToken in place of its CmdSetStatementSyntax.EqualsToken.

public CmdSetStatementSyntax WithEqualsToken(SyntaxToken equalsToken)

Parameters

equalsToken SyntaxToken

Returns

CmdSetStatementSyntax

WithNameToken(SyntaxToken)

Syntax.g.cs

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

public CmdSetStatementSyntax WithNameToken(SyntaxToken nameToken)

Parameters

nameToken SyntaxToken

Returns

CmdSetStatementSyntax

WithRedirections(SyntaxList<ShellRedirectionSyntax>)

Syntax.g.cs

Returns this node with redirections in place of its CmdSetStatementSyntax.Redirections.

public CmdSetStatementSyntax WithRedirections(SyntaxList<ShellRedirectionSyntax> redirections)

WithSetKeyword(SyntaxToken)

Syntax.g.cs

Returns this node with setKeyword in place of its CmdSetStatementSyntax.SetKeyword.

public CmdSetStatementSyntax WithSetKeyword(SyntaxToken setKeyword)

Parameters

setKeyword SyntaxToken

Returns

CmdSetStatementSyntax

WithSwitchToken(SyntaxToken)

Syntax.g.cs

Returns this node with switchToken in place of its CmdSetStatementSyntax.SwitchToken.

public CmdSetStatementSyntax WithSwitchToken(SyntaxToken switchToken)

Parameters

switchToken SyntaxToken

Returns

CmdSetStatementSyntax

WithValue(ShellWordSyntax?)

Syntax.g.cs

Returns this node with value in place of its CmdSetStatementSyntax.Value.

public CmdSetStatementSyntax WithValue(ShellWordSyntax? value)