Skip to content

Commit

Permalink
Fixes #12039 (#12066)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Jun 23, 2024
1 parent a9e800a commit bf7b327
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/js_lexer/identifier.zig
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ pub const JumpTable = struct {
// explicitly tell LLVM's optimizer about values we know will not be in the range of this switch statement
0xaa...0xffd7 => isIdentifierPartSlow16(@as(u16, @intCast(codepoint))),
(0xffd7 + 1)...0xe01ef => isIdentifierPartSlow32(codepoint),

else => false,
};
}
Expand Down Expand Up @@ -108,6 +109,8 @@ pub const JumpTable = struct {
'A'...'Z', 'a'...'z', '0'...'9', '$', '_' => true,
else => if (codepoint < 128)
return false
else if (codepoint == 0x200C or codepoint == 0x200D)
return true
else
return isIdentifierPartSlow(codepoint),
};
Expand Down
Loading

0 comments on commit bf7b327

Please sign in to comment.