Expand description
Parser components, includes parser error.
This parser is a simple greedy algorithm that returns result when matched successfully; try next or return error when mismatched.
The Loader
type can simply convert string into Node
type.
Each pattern (the method of Parser
type) is called “sub-parser”,
which returns a Result<T, PError>
type, where T
is the return type.
Errors
Document
WRONG: Invalid tag directive will be ignored.
- document splitter: Error about the document splitter
---
/...
. - checked version: Version directive
%YAML 1.2
is used again. - version: Version directive is wrong, must be
1.2
.
Structure
Flow Array
- flow sequence item: Item in
[]
bracket is invalid.
Flow Map
- flow map key: Key of map item in
{}
bracket is invalid. - flow map value: Value of map item in
{}
bracket is invalid. - flow map splitter: Splitter
:
of map item in{}
bracket is invalid.
Array
- sequence item: Item behind
-
indicator is invalid. - sequence terminator: The end of sequence is invalid, may caused by the last item (like wrapped string).
Map
- map key: Key of map item is invalid.
- map value: Value of map item is invalid.
- map splitter: Splitter
:
of map item is invalid. - map terminator: The end of map is invalid, may caused by the last value (like wrapped string).
Structs
A parser with YAML grammar, support UTF-8 characters.
Basic greedy parser with YAML syntax.
Enums
The option of Parser::take_while
.
Constants
The default prefix of the YAML sub tag.
Functions
Parse YAML document into alloc::rc::Rc
or alloc::sync::Arc
data holder.
Return an sequence of nodes and the anchors.
Type Definitions
Type of the parser result.