1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:47:35 +00:00

LibJS: Allow lexer to run without logging errors

This commit is contained in:
AnotherTest 2020-04-05 16:19:25 +04:30 committed by Andreas Kling
parent c2f8a5fffa
commit cdb627a516
2 changed files with 9 additions and 1 deletions

View file

@ -204,7 +204,8 @@ bool Lexer::is_numeric_literal_start() const
void Lexer::syntax_error(const char* msg)
{
m_has_errors = true;
fprintf(stderr, "Syntax Error: %s (line: %zu, column: %zu)\n", msg, m_line_number, m_line_column);
if (m_log_errors)
fprintf(stderr, "Syntax Error: %s (line: %zu, column: %zu)\n", msg, m_line_number, m_line_column);
}
Token Lexer::next()