Skip to content

Conversation

@coreyoconnor
Copy link
Contributor

WIP only cause this is done on top of my other branch. Can be separated just lazy.

This adds `parseYAML` and `parseAllYAMLs` to the `yaml` package object.

The first is the single document parsing provided by `.asNode`. The
second parses a sequence of documents.

To implement this, a fairly small addition was made to `Composer`:
`multipleFromEvents`. Which uses `composeNode` to parse `Node`s from the
events so long as there are `tail` events returned.

This also exposes the `pos` method of `Node`. This is useful when
writing custom decoders for nicer error messages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant