Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ecma/lexer): hexadecimal escape sequences #2838

Merged
merged 2 commits into from
Nov 24, 2021
Merged

fix(ecma/lexer): hexadecimal escape sequences #2838

merged 2 commits into from
Nov 24, 2021

Conversation

RiESAEX
Copy link
Contributor

@RiESAEX RiESAEX commented Nov 22, 2021

fix #2822

kdy1
kdy1 previously approved these changes Nov 23, 2021
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

Thanks!

@kdy1
Copy link
Member

kdy1 commented Nov 23, 2021

Oh, some tests are failing.
Can you run UPDATE=1 cargo test from parser and minifier?

@RiESAEX
Copy link
Contributor Author

RiESAEX commented Nov 23, 2021

sure, but I think transform

`\x3c!--` to "\\x3c--"

isn't right for a minifer. I'm looking into it, any idea?

@@ -23,6 +23,7 @@ where
}) && (M::force_str_for_tpl()
|| (!c.value.contains("\\n") && !c.value.contains("\\r")))
&& !c.value.contains("\\0")
&& !c.value.contains("\\x")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

before this, we store

`\x21`

like \0x21, hit line 25.
now it is \x21 so I add this line

Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

Thanks!

@kdy1 kdy1 enabled auto-merge (squash) November 24, 2021 05:04
@kdy1 kdy1 added this to the v1.2.112 milestone Nov 24, 2021
@kdy1 kdy1 merged commit cf777c5 into swc-project:main Nov 24, 2021
@swc-project swc-project locked as resolved and limited conversation to collaborators Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

TaggedTemplateLiteral Parser Error
2 participants