Use of throwIfError for handling scanPlain errors.
This commit is contained in:
parent
60c3079f11
commit
45d8db08d1
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue