PosixHereDocumentSyntax Class
Represents the body of a here-document, including its closing delimiter line.
public sealed class PosixHereDocumentSyntax : ShellStatementSyntaxRemarks
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
ShellStatementSyntaxPosixHereDocumentSyntax
Properties
| Name | Description |
|---|---|
| BodyToken | |
| DelimiterToken | |
| IsQuotedDelimiter | Returns true when the delimiter was quoted, which disables expansion inside the body. |
| Redirection | The redirection that introduced this here-document. |
| StripsLeadingTabs | Returns true when the operator was <<-, which strips leading tabs at runtime. |
BodyToken
Syntax.g.csDelimiterToken
Syntax.g.csIsQuotedDelimiter
PosixHereDocumentSyntax.csRedirection
PosixHereDocumentSyntax.csThe redirection that introduced this here-document.
public ShellRedirectionSyntax? Redirection { get; }Property value
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.
StripsLeadingTabs
PosixHereDocumentSyntax.csMethods
| Name | Description |
|---|---|
| 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.cspublic override void Accept(ShellSyntaxVisitor visitor)Parameters
visitorShellSyntaxVisitor
No documentation is available.
Accept<TResult>(ShellSyntaxVisitor<TResult>)
Syntax.g.cspublic override TResult? Accept<TResult>(ShellSyntaxVisitor<TResult> visitor)No documentation is available.
Update(SyntaxToken, SyntaxToken)
Syntax.g.csReturns this node with the given parts, or itself when nothing changed.
public PosixHereDocumentSyntax Update(SyntaxToken bodyToken, SyntaxToken delimiterToken)WithBodyToken(SyntaxToken)
Syntax.g.csReturns this node with bodyToken in place of its PosixHereDocumentSyntax.BodyToken.
public PosixHereDocumentSyntax WithBodyToken(SyntaxToken bodyToken)WithDelimiterToken(SyntaxToken)
Syntax.g.csReturns this node with delimiterToken in place of its PosixHereDocumentSyntax.DelimiterToken.
public PosixHereDocumentSyntax WithDelimiterToken(SyntaxToken delimiterToken)