Skip to content

Commit

Permalink
Fix for UNFINISHED REGEX syntax error when parsing true / false (fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Nov 2, 2023
1 parent e4308c2 commit 0f1b5b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
Add ES9 optional catch binding (`try {} catch {}`)
Bangle.js: Fix terminal's repeated call to '.flip' that broke double buffering on Bangle.js 1
JIT: Ensure ternary block skips 'named' variables (and references them correctly)
Fix for UNFINISHED REGEX syntax error when parsing `true / false` (fix #2424)

2v19 : Fix Object.values/entries for numeric keys after 2v18 regression (fix #2375)
nRF52: for SD>5 use static buffers for advertising and scan response data (#2367)
Expand Down
3 changes: 2 additions & 1 deletion src/jslex.c
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,8 @@ void jslGetNextToken() {
case JSLJT_FORWARDSLASH:
// yay! JS is so awesome.
if (lastToken==LEX_EOF ||
(lastToken>=_LEX_TOKENS_START && lastToken<=_LEX_TOKENS_END) || // any keyword or operator
(lastToken>=_LEX_TOKENS_START && lastToken<=_LEX_TOKENS_END && // keyword or operator
lastToken!=LEX_R_TRUE && lastToken!=LEX_R_FALSE && lastToken!=LEX_R_NULL && lastToken!=LEX_R_UNDEFINED) || // but not values (#2424)
lastToken=='!' ||
lastToken=='%' ||
lastToken=='&' ||
Expand Down

0 comments on commit 0f1b5b0

Please sign in to comment.