1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 00:27:43 +00:00

LibJS: Fix parsing of invalid numeric literals

i.e. "1e" "0x" "0b" "0o" used to be parsed as valid literals.
They now produce invalid tokens. Fixes #3716
This commit is contained in:
Stephan Unverwerth 2020-10-18 15:32:50 +02:00 committed by Andreas Kling
parent 3efd4c105f
commit 2c888b3c6e
3 changed files with 63 additions and 14 deletions

View file

@ -42,7 +42,10 @@ public:
private:
void consume();
void consume_exponent();
bool consume_exponent();
bool consume_octal_number();
bool consume_hexadecimal_number();
bool consume_binary_number();
bool is_eof() const;
bool is_identifier_start() const;
bool is_identifier_middle() const;