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