This commit is contained in:
Ferdinand Majerech 2014-07-26 03:16:01 +02:00
parent 08f8168889
commit ccdbc21e8f

View file

@ -882,17 +882,16 @@ final class Scanner
reader_.sliceBuilder.write(reader_.get(length));
}
/**
* Move to next token in the file/stream.
*
* We ignore spaces, line breaks and comments.
* If we find a line break in the block context, we set
* allowSimpleKey` on.
*
* We do not yet support BOM inside the stream as the
* specification requires. Any such mark will be considered as a part
* of the document.
*/
/// Move to next token in the file/stream.
///
/// We ignore spaces, line breaks and comments.
/// If we find a line break in the block context, we set
/// allowSimpleKey` on.
///
/// We do not yet support BOM inside the stream as the
/// specification requires. Any such mark will be considered as a part
/// of the document.
void scanToNextToken() @safe pure nothrow @nogc
{
// TODO(PyYAML): We need to make tab handling rules more sane. A good rule is:
@ -915,7 +914,10 @@ final class Scanner
{
if(flowLevel_ == 0) { allowSimpleKey_ = true; }
}
else{break;}
else
{
break;
}
}
}
@ -1040,7 +1042,7 @@ final class Scanner
enforce("\0\n\r\u0085\u2028\u2029"d.canFind(reader_.peek()),
new Error("While scanning a directive", startMark,
"expected comment or a line break, but found"
~ to!string(reader_.peek()), reader_.mark));
~ reader_.peek().to!string, reader_.mark));
scanLineBreak();
}
@ -1304,7 +1306,6 @@ final class Scanner
}
const slice = reader_.sliceBuilder.finish();
return scalarToken(startMark, endMark, slice.utf32To8, style);
}