TriviaContent Type
The kind of non-code content that can be attached to a node as trivia.
Single-line and line-after-source-code comments carry their text; block comments
also record whether blank lines should surround them.
Union cases
| Union case |
Description
|
Full Usage:
BlockComment(comment, newlineBefore, newlineAfter)
Parameters:
string
newlineBefore : bool
newlineAfter : bool
|
|
Full Usage:
CommentOnSingleLine string
Parameters:
string
|
|
Full Usage:
CommentOnSingleLineWithLeadingNewlines(newlines, comment)
Parameters:
int
comment : string
|
A single-line comment preceded by one or more blank lines in the source. Unlike a plain CommentOnSingleLine + separate Newline trivia, this combined case ensures the blank lines and comment are assigned to the same Oak node during trivia assignment. Without this, the Newline (at column 0) and the indented comment (at column > 0) would be assigned to different nodes via different matching paths, causing the blank line to be lost or misplaced after formatting.
|
Full Usage:
Cursor
|
|
Full Usage:
Directive string
Parameters:
string
|
|
Full Usage:
LineCommentAfterSourceCode comment
Parameters:
string
|
|
Full Usage:
Newline
|
|
Instance members
| Instance member |
Description
|
Full Usage:
this.IsBlockComment
Returns: bool
|
|
Full Usage:
this.IsCommentOnSingleLine
Returns: bool
|
|
Full Usage:
this.IsCommentOnSingleLineWithLeadingNewlines
Returns: bool
|
|
Full Usage:
this.IsCursor
Returns: bool
|
|
Full Usage:
this.IsDirective
Returns: bool
|
|
Full Usage:
this.IsLineCommentAfterSourceCode
Returns: bool
|
|
Full Usage:
this.IsNewline
Returns: bool
|
|
fantomas