X-Git-Url: http://git.tdb.fi/?p=libs%2Fdatafile.git;a=blobdiff_plain;f=source%2Fparser.cpp;h=5972e2d98f832d312afa4373bfe66d4204d10f8f;hp=9ad70d8742884bfdfa40d5bebbc467b9e289afe7;hb=ed78b585cfc4ecb44972e346857e887b183fd7a7;hpb=3b78eeb8b92dc3524d6a0456b4daf0a0f3dbf813 diff --git a/source/parser.cpp b/source/parser.cpp index 9ad70d8..5972e2d 100644 --- a/source/parser.cpp +++ b/source/parser.cpp @@ -1,6 +1,6 @@ #include #include "binaryparser.h" -#include "dataerror.h" +#include "except.h" #include "parser.h" #include "statement.h" #include "textparser.h" @@ -88,7 +88,7 @@ void Parser::process_control_statement(const Statement &st) const StatementKey *Parser::peek(unsigned level) { - while(1) + while(good) { const StatementKey *key = mode->peek(level); if(key && !key->keyword.compare(0, 2, "__")) @@ -96,6 +96,8 @@ const StatementKey *Parser::peek(unsigned level) else return key; } + + return 0; } bool Parser::parse_and_load(unsigned level, Loader &ldr, const LoaderAction &act)