Default scanToNextBreak now only skips, doesn't scan anything.

This commit is contained in:
Ferdinand Majerech 2014-07-26 03:16:27 +02:00
parent ccdbc21e8f
commit 8b086caa40

View file

@ -857,15 +857,13 @@ final class Scanner
return reader_.get(length);
}
/// Scan all characters until next line break.
dchar[] scanToNextBreak() @safe pure nothrow @nogc
/// Scan and throw away all characters until next line break.
void scanToNextBreak() @safe pure nothrow @nogc
{
uint length = 0;
while(!"\0\n\r\u0085\u2028\u2029"d.canFind(reader_.peek(length)))
while(!"\0\n\r\u0085\u2028\u2029"d.canFind(reader_.peek()))
{
++length;
reader_.forward();
}
return reader_.get(length);
}
/// Scan all characters until next line break.