mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +00:00
LibJS: Emit token message for invalid numeric literals
This commit is contained in:
parent
19edcbd79c
commit
6a3389cec6
Notes:
sideshowbarker
2024-07-19 01:41:32 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/6a3389cec6e Pull-request: https://github.com/SerenityOS/serenity/pull/3861
1 changed files with 3 additions and 1 deletions
|
@ -505,8 +505,10 @@ Token Lexer::next()
|
|||
is_invalid_numeric_literal = !consume_exponent();
|
||||
}
|
||||
}
|
||||
if (is_invalid_numeric_literal)
|
||||
if (is_invalid_numeric_literal) {
|
||||
token_type = TokenType::Invalid;
|
||||
token_message = "Invalid numeric literal";
|
||||
}
|
||||
} else if (m_current_char == '"' || m_current_char == '\'') {
|
||||
char stop_char = m_current_char;
|
||||
consume();
|
||||
|
|
Loading…
Add table
Reference in a new issue