PosixHereDocumentSyntax Class

Represents the body of a here-document, including its closing delimiter line.

public sealed class PosixHereDocumentSyntax : ShellStatementSyntax

Remarks

The body starts at the first line break after the << operator, not right after it, so it follows the command line it belongs to rather than nesting inside it. PosixHereDocumentSyntax.Redirection links back to the redirection that introduced it, and ShellRedirectionSyntax.HereDocument is the reverse link.

Inheritance
ShellStatementSyntax PosixHereDocumentSyntax

Properties

NameDescription
BodyToken
DelimiterToken
IsQuotedDelimiterReturns true when the delimiter was quoted, which disables expansion inside the body.
RedirectionThe redirection that introduced this here-document.
StripsLeadingTabsReturns true when the operator was <<-, which strips leading tabs at runtime.

BodyToken

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

Property value

SyntaxToken

No documentation is available.

DelimiterToken

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

Property value

SyntaxToken

No documentation is available.

Returns true when the delimiter was quoted, which disables expansion inside the body.

public bool IsQuotedDelimiter { get; }

Property value

bool

The redirection that introduced this here-document.

public ShellRedirectionSyntax? Redirection { get; }

Property value

ShellRedirectionSyntax?

Remarks

Worked out from the tree rather than stored. Bodies come in the order of the << redirections that introduced them, so the n-th body pairs up with the n-th redirection.

Returns true when the operator was <<-, which strips leading tabs at runtime.

public bool StripsLeadingTabs { get; }

Property value

bool

Methods

NameDescription
Accept(ShellSyntaxVisitor)
Accept<TResult>(ShellSyntaxVisitor<TResult>)
Update(SyntaxToken, SyntaxToken)Returns this node with the given parts, or itself when nothing changed.
WithBodyToken(SyntaxToken)Returns this node with bodyToken in place of its PosixHereDocumentSyntax.BodyToken.
WithDelimiterToken(SyntaxToken)Returns this node with delimiterToken in place of its PosixHereDocumentSyntax.DelimiterToken.

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 PosixHereDocumentSyntax Update(SyntaxToken bodyToken, SyntaxToken delimiterToken)

Parameters

bodyToken SyntaxToken
delimiterToken SyntaxToken

Returns

PosixHereDocumentSyntax

WithBodyToken(SyntaxToken)

Syntax.g.cs

Returns this node with bodyToken in place of its PosixHereDocumentSyntax.BodyToken.

public PosixHereDocumentSyntax WithBodyToken(SyntaxToken bodyToken)

Parameters

bodyToken SyntaxToken

Returns

PosixHereDocumentSyntax

WithDelimiterToken(SyntaxToken)

Syntax.g.cs

Returns this node with delimiterToken in place of its PosixHereDocumentSyntax.DelimiterToken.

public PosixHereDocumentSyntax WithDelimiterToken(SyntaxToken delimiterToken)

Parameters

delimiterToken SyntaxToken

Returns

PosixHereDocumentSyntax