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