mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:27:45 +00:00
LibJS: Disallow yield expression correctly in formal parameters
And add ZERO WIDTH NO BREAK SPACE to valid whitespace.
This commit is contained in:
parent
7bcffd1b6a
commit
c108c8ff24
4 changed files with 11 additions and 3 deletions
|
@ -363,7 +363,7 @@ bool Lexer::is_whitespace() const
|
|||
if (!is_unicode_character())
|
||||
return false;
|
||||
auto code_point = current_code_point();
|
||||
if (code_point == NO_BREAK_SPACE)
|
||||
if (code_point == NO_BREAK_SPACE || code_point == ZERO_WIDTH_NO_BREAK_SPACE)
|
||||
return true;
|
||||
|
||||
static auto space_separator_category = Unicode::general_category_from_string("Space_Separator"sv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue