-
Notifications
You must be signed in to change notification settings - Fork 44
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
String literals are incorrectly parsed #70
Comments
@KFlash will you be able to fix it anytime soon? It's a very critical one |
cc / @aladdin-add |
@KFlash is meriyah no longer maintained? If not, please let me know, I will switch it out. This bug is very critical and a major blocker for a lot of users. |
Everyone is free to contribute. It's open source. |
@aladdin-add Can you push to NPM? |
@KFlash this hasn't been fixed |
It\s fixed. '\u180e' is not a valid whitespace. Test262 test suite give you this: Esprima have a test covering all exotic whitespaces https://github.com/jquery/esprima/tree/master/test/fixtures/whitespace Another example that one is invalid: https://github.com/shapesecurity/shift-parser-js/blob/es2018/test/miscellaneous/whitespace.js#L36 @nchanged Next time be sure you file a valid issue. |
It is a valid issue !!! From the angular source !!! |
just published 1.9.9, please give it a try! |
@KFlash the problem line of code is taken directly from @angular/compiler/fesm5/compiler.js, line 10624 |
@aladdin-add it has been published already, you have published the same code ) the issue that it cant parse the angular source still |
@KFlash ignoring an edge case in a framework that's literally used by hundreds of thousands of developers doesn't sound logical to me. Besides, even if it's NOT correct, meriyah should NOT corrupt the output |
@aladdin-add Can you fix this? @nchanged confused both of us. This is not an whitespace issue at all. It string literal related. So the title of this issue is wrong. This is an easy fix, but I got no time now. |
@nchanged Try to parse the code in the Meriyah REPL, and in ASTExplorer with Meriyah. There are no issues. |
It passes. But feel free to open a PR or @aladdin-add maybe look into it. |
I changed the subject. |
I’ll just make it clear as I found the original problem. All this stuff is borderline black magic so I think we all need to take a step back and appreciate for a second how hard this shit is and how big brainEd we all are. It’s basically computer science. Coming from a lowly angular developer. I just want to build my angular app in ES5 as I have IE11-using customers. If I use meriyah, it breaks in this single and specific way. If I use ts, it builds fine but much slower. Can we focus on just solving this and moving forward pls |
It's the same in the REPL |
I see multiple technical issues involved in this thread.
|
Telling the angular team that is likely a futile endeavour... besides I don’t fully understand the issue enough to post a problem about it. Could you do me a favour and write a more complete post about it even in here and I’ll pass it on? |
@jpike88 Easy.
is both invalid, and mix of both whitespace and line terminators. See @JLHwung comment for
Take a look at the TypeScript source. They got it right :) Found here |
subj
here is the source
https://raw.githubusercontent.com/zloirock/core-js/master/packages/core-js/internals/whitespaces.js
The text was updated successfully, but these errors were encountered: