More @nogc in Scanner.

This commit is contained in:
Ferdinand Majerech 2014-08-02 01:19:29 +02:00
parent e6fdade4a6
commit b5da695d6b

View file

@ -1052,7 +1052,8 @@ final class Scanner
/// characters into that slice. /// characters into that slice.
/// ///
/// In case of an error, error_ is set. Use throwIfError() to handle this. /// In case of an error, error_ is set. Use throwIfError() to handle this.
void scanTagDirectivePrefixToSlice(const Mark startMark) @system pure nothrow void scanTagDirectivePrefixToSlice(const Mark startMark)
@system pure nothrow @nogc
{ {
scanTagURIToSlice!"directive"(startMark); scanTagURIToSlice!"directive"(startMark);
if(" \0\n\r\u0085\u2028\u2029"d.canFind(reader_.peek())) { return; } if(" \0\n\r\u0085\u2028\u2029"d.canFind(reader_.peek())) { return; }
@ -1125,7 +1126,7 @@ final class Scanner
/// Scan a tag token. /// Scan a tag token.
/// ///
/// In case of an error, error_ is set. Use throwIfError() to handle this. /// In case of an error, error_ is set. Use throwIfError() to handle this.
Token scanTag() @trusted pure nothrow Token scanTag() @trusted pure nothrow @nogc
{ {
const startMark = reader_.mark; const startMark = reader_.mark;
dchar c = reader_.peek(1); dchar c = reader_.peek(1);
@ -1887,7 +1888,7 @@ final class Scanner
/// ///
/// In case of an error, error_ is set. Use throwIfError() to handle this. /// In case of an error, error_ is set. Use throwIfError() to handle this.
void scanTagURIToSlice(string name)(const Mark startMark) void scanTagURIToSlice(string name)(const Mark startMark)
@trusted pure nothrow // @nogc @trusted pure nothrow @nogc
{ {
// Note: we do not check if URI is well-formed. // Note: we do not check if URI is well-formed.
dchar c = reader_.peek(); dchar c = reader_.peek();
@ -1929,7 +1930,7 @@ final class Scanner
/// ///
/// In case of an error, error_ is set. Use throwIfError() to handle this. /// In case of an error, error_ is set. Use throwIfError() to handle this.
void scanURIEscapesToSlice(string name)(const Mark startMark) void scanURIEscapesToSlice(string name)(const Mark startMark)
@system pure nothrow // @nogc @system pure nothrow @nogc
{ {
// URI escapes encode a UTF-8 string. We store UTF-8 code units here for // URI escapes encode a UTF-8 string. We store UTF-8 code units here for
// decoding into UTF-32. // decoding into UTF-32.