| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Yamlet.Internal.Comments
Description
Attachment of comments and empty lines to the nodes of a document.
The rules are in the documentation of Yamlet.Syntax. The parser skips comments, so this module finds them again in the input, outside of the scalars, and gives each one to a node.
This module is intended for internal use only, and may change without warning in subsequent releases.
Documentation
attachComments :: Env -> Bool -> Bool -> Int -> Maybe Int -> Int -> Int -> Document -> (Document, [Line]) Source #
Attach the comments of a document, and return the lines at its end that
belong to the next document. The flags tell if the document is the first
one and if another one follows it. The indices are the start of the lines
that belong to the document, its --- marker, the end of its root and its
end.