Stripped spaces.
This commit is contained in:
parent
db7fecf960
commit
388b74b332
|
@ -260,10 +260,10 @@ final class Parser
|
||||||
return streamStartEvent(token.startMark, token.endMark, token.encoding);
|
return streamStartEvent(token.startMark, token.endMark, token.encoding);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Parse implicit document start, unless explicit is detected: if so, parse explicit.
|
/// Parse implicit document start, unless explicit detected: if so, parse explicit.
|
||||||
Event parseImplicitDocumentStart() @trusted
|
Event parseImplicitDocumentStart() @trusted
|
||||||
{
|
{
|
||||||
//Parse an implicit document.
|
// Parse an implicit document.
|
||||||
if(!scanner_.checkToken(TokenID.Directive, TokenID.DocumentStart,
|
if(!scanner_.checkToken(TokenID.Directive, TokenID.DocumentStart,
|
||||||
TokenID.StreamEnd))
|
TokenID.StreamEnd))
|
||||||
{
|
{
|
||||||
|
@ -335,14 +335,14 @@ final class Parser
|
||||||
return parseBlockNode();
|
return parseBlockNode();
|
||||||
}
|
}
|
||||||
|
|
||||||
///Process directives at the beginning of a document.
|
/// Process directives at the beginning of a document.
|
||||||
TagDirective[] processDirectives() @system
|
TagDirective[] processDirectives() @system
|
||||||
{
|
{
|
||||||
//Destroy version and tag handles from previous document.
|
// Destroy version and tag handles from previous document.
|
||||||
YAMLVersion_ = null;
|
YAMLVersion_ = null;
|
||||||
tagDirectives_.length = 0;
|
tagDirectives_.length = 0;
|
||||||
|
|
||||||
//Process directives.
|
// Process directives.
|
||||||
while(scanner_.checkToken(TokenID.Directive))
|
while(scanner_.checkToken(TokenID.Directive))
|
||||||
{
|
{
|
||||||
immutable token = scanner_.getToken();
|
immutable token = scanner_.getToken();
|
||||||
|
@ -363,7 +363,7 @@ final class Parser
|
||||||
|
|
||||||
foreach(ref pair; tagDirectives_)
|
foreach(ref pair; tagDirectives_)
|
||||||
{
|
{
|
||||||
//handle
|
// handle
|
||||||
const h = pair.handle;
|
const h = pair.handle;
|
||||||
enforce(h != handle, new Error("Duplicate tag handle: " ~ handle,
|
enforce(h != handle, new Error("Duplicate tag handle: " ~ handle,
|
||||||
token.startMark));
|
token.startMark));
|
||||||
|
@ -385,7 +385,7 @@ final class Parser
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(!found){tagDirectives_ ~= defaultPair;}
|
if(!found) {tagDirectives_ ~= defaultPair; }
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
|
|
|
@ -932,7 +932,7 @@ final class Scanner
|
||||||
Token scanDirective() @trusted pure
|
Token scanDirective() @trusted pure
|
||||||
{
|
{
|
||||||
Mark startMark = reader_.mark;
|
Mark startMark = reader_.mark;
|
||||||
//Skip the '%'.
|
// Skip the '%'.
|
||||||
reader_.forward();
|
reader_.forward();
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue