fixed Coverity errors

This commit is contained in:
mrexodia 2017-01-09 01:09:17 +01:00
parent 46b59b43ce
commit 90eed9913a
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
2 changed files with 1 additions and 3 deletions

View File

@ -96,8 +96,6 @@ bool Lexer::Test(const std::function<void(const std::string & line)> & lexEnum,
lexEnum(toks);
}
while(tok != tok_eof && tok != tok_error);
if(tok != tok_error && tok != tok_eof)
tok = reportError("lexer did not finish at the end of the file");
for(const auto & warning : mWarnings)
if(output)
lexEnum("\nwarning: " + warning);

View File

@ -37,7 +37,7 @@ public:
struct TokenState
{
Token Token;
Token Token = tok_eof;
std::string IdentifierStr; //tok_identifier
uint64_t NumberVal = 0; //tok_number
std::string StringLit; //tok_stringlit