mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Fix handling of invalid HexIntegerLiterals in lexer.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
This commit is contained in:
parent
69655f4456
commit
f3ef9afb91
@ -849,16 +849,20 @@ lexer_parse_number (void)
|
||||
consume_char ();
|
||||
consume_char ();
|
||||
new_token ();
|
||||
while (true)
|
||||
|
||||
c = LA (0);
|
||||
if (!lit_char_is_hex_digit (c))
|
||||
{
|
||||
c = LA (0);
|
||||
if (!lit_char_is_hex_digit (c))
|
||||
{
|
||||
break;
|
||||
}
|
||||
consume_char ();
|
||||
PARSE_ERROR ("Invalid HexIntegerLiteral", lit_utf8_iterator_get_pos (&src_iter));
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
consume_char ();
|
||||
c = LA (0);
|
||||
}
|
||||
while (lit_char_is_hex_digit (c));
|
||||
|
||||
if (lexer_is_char_can_be_identifier_start (c))
|
||||
{
|
||||
PARSE_ERROR ("Identifier just after integer literal", lit_utf8_iterator_get_pos (&src_iter));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user