yamlet
Safe HaskellNone
LanguageGHC2021

Yamlet.Internal.Parser

Description

The parser of YAML 1.2.2 streams.

The functions follow the productions of the specification and keep their names, e.g. nsFlowNode implements ns-flow-node(n,c). A few productions are fused into loops over the bytes of the input for speed. Each production is a top-level function, also if only one function uses it, so that the parser reads like the grammar of the specification.

This module is intended for internal use only, and may change without warning in subsequent releases.

Synopsis

Documentation

parseStream :: Text -> Either Error [Document] Source #

Parse all documents of a stream.

Block scalars

data BlockLine Source #

A content line of a block scalar: the number of empty lines before it and its text after the indentation.

Constructors

BlockLine !Int !Text 

foldedText :: [BlockLine] -> (Text, [Int]) Source #

The text of a folded block scalar and the positions where its lines start.