Calc: syntax error on unrecognized token
This commit is contained in:
parent
33f8c30bfc
commit
0f6f923666
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue