-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
formats.js won't parse with js2py #2669
Comments
@Antar1011, it seems the reason is the introduction of arrow functions in this file. Is there any chance you could use PyEsprima for ES6 support or otherwise preprocess the content of the I guess we could also compile an ES5-friendly |
You could also just manually do a text replacement before passing to js2py. |
The file shouldn't have arrow functions in the first place, Slayer95...... |
Introduced in 9e403b8. I wasn't aware of any such restriction anyway... |
Why shouldn't it have arrow functions? |
@Slayer95, pyesprima doesn't work with Python 3 (a Py3 version is currently in PR). @Zarel, I'm not against pre-processing the scripts per se but this book is the extent of my JavaScript knowledge: so I'll need a lot of hand-holding. |
Ha. Forget js2py, there's now a pip-installable pyv8: |
Oh, that kind of arrow function. That's fine. I just meant |
I'm using js2py to synchronize PS data (banlists, aliases, etc.) with my stats projects (esp. Onix), and currently my script which scrapes formats.js breaks. It worked as of a few weeks ago, so I'm wondering what might have changed to break it, and whether it's something that's absolutely needed. Here's my traceback:
The text was updated successfully, but these errors were encountered: