mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 17:49:40 +00:00
LibJS: Allow lexer to run without logging errors
This commit is contained in:
parent
c2f8a5fffa
commit
cdb627a516
Notes:
sideshowbarker
2024-07-19 07:53:08 +09:00
Author: https://github.com/alimpfard
Commit: cdb627a516
Pull-request: https://github.com/SerenityOS/serenity/pull/1631
Reviewed-by: https://github.com/awesomekling
2 changed files with 9 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue