Use of throwIfError for handling scanPlain errors.

This commit is contained in:
Ferdinand Majerech 2014-07-24 18:43:33 +02:00
parent 60c3079f11
commit 45d8db08d1

View file

@ -726,16 +726,12 @@ final class Scanner
// change this flag if the scan is finished at the beginning of the line.
allowSimpleKey_ = false;
const plain = scanPlain();
if(error_)
{
error_ = false;
throw new Error(errorData_);
}
throwIfError();
// Scan and add SCALAR. May change allowSimpleKey_
tokens_.push(plain);
}
///Check if the next token is DIRECTIVE: ^ '%' ...
bool checkDirective() @safe pure nothrow @nogc
{