dyaml.resolver

Implements a class that resolves YAML tags. This can be used to implicitly resolve tags for custom data types, removing the need to explicitly specify tags in YAML. A tutorial can be found

here.

Code based on PyYAML.

alias RegexType
struct Resolver

Types 2

private aliasRegexType = Tuple!(string, "tag", const Regex!char, "regexp", string, "chars")

Type of regexes

structResolver

Resolves YAML tags (data types).

Can be used to implicitly resolve custom data types of scalar values.

Fields
string defaultScalarTag_
string defaultSequenceTag_
string defaultMappingTag_
Tuple!(string, const Regex!char)[][dchar] yamlImplicitResolvers_
Methods
static auto withDefaultResolvers() @safe
bool opEquals(ref Resolver) @disable
int opCmp(ref Resolver) @disable
void addImplicitResolver(string tag, const Regex!char regexp, string first) pure @safeAdd an implicit scalar resolver.
string resolve(const NodeID kind, const string tag, scope string value, const bool implicit) @safeResolve tag of a node.
string defaultScalarTag() @property const pure @safe nothrowReturns: Default scalar tag.
string defaultSequenceTag() @property const pure @safe nothrowReturns: Default sequence tag.
string defaultMappingTag() @property const pure @safe nothrowReturns: Default mapping tag.

Variables 1

private varRegexType[] regexes