mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:58:11 +00:00
LibJS: Emit token message for invalid numeric literals
This commit is contained in:
parent
19edcbd79c
commit
6a3389cec6
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
Add a link
Reference in a new issue