Logo Fabulous.AST

BlockCommentBuilders Module

Type extensions

Type extension Description

Ast.BlockComment(comment, ?newlineBefore, ?newlineAfter)

Full Usage: Ast.BlockComment(comment, ?newlineBefore, ?newlineAfter)

Parameters:
    comment : string - The comment text.
    ?newlineBefore : bool - Whether to add a newline before the comment content.
    ?newlineAfter : bool - Whether to add a newline after the comment content.

Returns: WidgetBuilder<TriviaContent>

Creates a block comment with optional newlines.

Used with triviaBefore on a declaration (a value, function, member, type or other module declaration), the comment is always followed by a line break, because a declaration that starts after a comment on the same line breaks the offside rule. A do expression gets the same treatment once it is yielded into a class or module. Before an expression, pattern or type the comment can stay inline; for any other expression yielded directly into a module, pass newlineAfter = true so that it does not share a line with the expression.

Extended Type: Ast

comment : string

The comment text.

?newlineBefore : bool

Whether to add a newline before the comment content.

?newlineAfter : bool

Whether to add a newline after the comment content.

Returns: WidgetBuilder<TriviaContent>

Type something to start searching.