ShellWordSyntax Class

Represents a single shell word: a command name, an argument, or a redirection target.

public sealed class ShellWordSyntax : ShellSyntaxNode
Inheritance
ShellSyntaxNode ShellWordSyntax

Properties

NameDescription
Parts
ValueReturns the word text with quotes and escapes resolved, or null when the value depends on runtime expansion (a variable reference or command substitution).
public SyntaxList<ShellWordPartSyntax> Parts { get; }

No documentation is available.

Returns the word text with quotes and escapes resolved, or null when the value depends on runtime expansion (a variable reference or command substitution).

public string? Value { get; }

Property value

string?

Methods

NameDescription
Accept(ShellSyntaxVisitor)
Accept<TResult>(ShellSyntaxVisitor<TResult>)
Update(SyntaxList<ShellWordPartSyntax>)Returns this node with the given parts, or itself when nothing changed.
WithParts(SyntaxList<ShellWordPartSyntax>)Returns this node with parts in place of its ShellWordSyntax.Parts.
WithText(string)Returns this word rewritten as a single literal part holding text.

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(SyntaxList<ShellWordPartSyntax>)

Syntax.g.cs

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

WithParts(SyntaxList<ShellWordPartSyntax>)

Syntax.g.cs

Returns this node with parts in place of its ShellWordSyntax.Parts.

WithText(string)

ShellWordSyntax.cs

Returns this word rewritten as a single literal part holding text.

public ShellWordSyntax WithText(string text)

Parameters

text string

Returns

ShellWordSyntax

Exceptions

ArgumentNullException
text is null.