Calc: syntax error on unrecognized token

This commit is contained in:
Robin Jadoul 2017-01-30 13:50:50 +01:00
parent 33f8c30bfc
commit 0f6f923666
1 changed files with 1 additions and 1 deletions

View File

@ -27,8 +27,8 @@ Parser::Token Parser::lex() {
return { calcParser_Symbol::T_EOF, nullptr };
}
catch (CalcLexer::NoMatch) {
std::cerr << "Syntax error: unrecognized token" << std::endl;
m_lex.skip(1);
return { calcParser_Symbol::V_error, nullptr }; //Somewhat dependent on the generated code, but this should always give an error
}
}
}