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

LibJS+LibCrypto: Allow '_' as a numeric literal separator :^)

This patch adds support for the NumericLiteralSeparator concept from
the ECMAScript grammar.
This commit is contained in:
Andreas Kling 2021-06-26 16:30:05 +02:00
parent 527c639c1f
commit 49018553d3
4 changed files with 61 additions and 15 deletions

View file

@ -29,6 +29,7 @@ private:
bool consume_octal_number();
bool consume_hexadecimal_number();
bool consume_binary_number();
bool consume_decimal_number();
bool is_eof() const;
bool is_line_terminator() const;
bool is_identifier_start() const;
@ -40,6 +41,8 @@ private:
bool match(char, char) const;
bool match(char, char, char) const;
bool match(char, char, char, char) const;
template<typename Callback>
bool match_numeric_literal_separator_followed_by(Callback) const;
bool slash_means_division() const;
StringView m_source;