Skip to content

fix(parser): fix line/column where string literal contains U+2028 or U+2029#477

Merged
3cp merged 4 commits intomeriyah:mainfrom
fisker:string-2028-2029
Jun 21, 2025
Merged

fix(parser): fix line/column where string literal contains U+2028 or U+2029#477
3cp merged 4 commits intomeriyah:mainfrom
fisker:string-2028-2029

Conversation

@fisker
Copy link
Copy Markdown
Collaborator

@fisker fisker commented Jun 21, 2025

Fixes #472

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jun 21, 2025

Open in StackBlitz

npm i https://pkg.pr.new/meriyah@477

commit: bb8f9d7

Comment thread src/lexer/string.ts
if (Chars.LineSeparator || char === Chars.ParagraphSeparator) {
parser.line++;
parser.column = 0;
}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find a better place to put this, is it fine?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@fisker fisker changed the title fix(parser): fix line/column where string literal contains u+2028 or U+2029 fix(parser): fix line/column where string literal contains U+2028 or U+2029 Jun 21, 2025
@3cp 3cp merged commit 6117d2f into meriyah:main Jun 21, 2025
5 checks passed
@fisker fisker deleted the string-2028-2029 branch June 21, 2025 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate how U+2028 and U+2029 should be parsed in string literal

2 participants