dyaml.scanner

YAML scanner. Code based on PyYAML: http://www.pyyaml.org

Types 11

aliasisBreak = among!('\0', '\n', '\r', '\u0085', '\u2028', '\u2029')

Scanner produces tokens of the following types: STREAM-START STREAM-END DIRECTIVE(name, value) DOCUMENT-START DOCUMENT-END BLOCK-SEQUENCE-START BLOCK-MAPPING-START BLOCK-END FLOW-SEQUENCE-START FLOW-MAPPING-START FLOW-SEQUENCE-END FLOW-MAPPING-END BLOCK-ENTRY FLOW-ENTRY KEY VALUE ALIAS(value) ANCHOR(value) TAG(value) SCALAR(value, plain, style)

aliasisBreakOrSpace = among!(' ', '\0', '\n', '\r', '\u0085', '\u2028', '\u2029')
aliasisWhiteSpace = among!(' ', '\t', '\0', '\n', '\r', '\u0085', '\u2028', '\u2029')
aliasisNonLinebreakWhitespace = among!(' ', '\t')
aliasisNonScalarStartCharacter = among!('-', '?', ':', ',', '[', ']', '{', '}', '#', '&', '*', '!', '|', '>', '\'', '"', '%', '@', '`', ' ', '\t', '\0', '\n', '\r', '\u0085', '\u2028', '\u2029')
aliasisURIChar = among!('-', ';', '/', '?', ':', '@', '&', '=', '+', '$', ',', '_', '.', '!', '~', '*', '\'', '(', ')', '[', ']', '%')
aliasisNSChar = among!(' ', '\n', '\r', '\u0085', '\u2028', '\u2029')
aliasisBChar = among!('\n', '\r', '\u0085', '\u2028', '\u2029')
aliasisFlowScalarBreakSpace = among!(' ', '\t', '\0', '\n', '\r', '\u0085', '\u2028', '\u2029', '\'', '"', '\\')
aliasisNSAnchorName = c => !c.isWhiteSpace && !c.among!('[', ']', '{', '}', ',', '\uFEFF')
structScanner

Generates tokens from data provided by a Reader.

Methods
void popFront() @safeAdvance to the next token
const(Token) front() @safeReturn the current token
bool empty() @safeReturn whether there are any more tokens left.
inout(string) name() ref inout @safe return pure nothrow @nogcSet file name.
Mark mark() const @safe pure nothrow @nogcGet a mark from the current reader position
Constructors
this(Reader reader)Construct a Scanner using specified Reader.
Nested Templates
SimpleKeyA simple key is a key that is not denoted by the '?' indicator. For example:
ChompingBlock chomping types.