-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Complete support of parsing multiple documents
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.
- Loading branch information
1 parent
2da1238
commit 59400f3
Showing
5 changed files
with
88 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters