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

Add support for classes #11

Open
rammy22 opened this issue May 24, 2017 · 3 comments
Open

Add support for classes #11

rammy22 opened this issue May 24, 2017 · 3 comments

Comments

@rammy22
Copy link

rammy22 commented May 24, 2017

Would you have any time soon to add support for parsing classes:
https://github.com/PiotrDabkowski/pyjsparser/blob/master/pyjsparser/parser.py#L2798

Unfortunately I hit this issue as soon as i gave it a try :(

Thanks!

@PiotrDabkowski
Copy link
Owner

PiotrDabkowski commented May 24, 2017

I did not really need to implement ECMA 6 for my purposes so pyjsparser only fully supports ECMA 5.1, sorry. You can try using my automated translation of esprima.js which supports everything. It is slower than pyjsparser but it works. You have an example at the end of the file.

@xmo-odoo xmo-odoo mentioned this issue Jun 27, 2017
@Kronuz
Copy link

Kronuz commented Jul 15, 2017

I worked in a port of the latest esprima to Python; it's quite fast too and it supports classes and everything esprima does: https://github.com/Kronuz/esprima-python

@PiotrDabkowski
Copy link
Owner

PiotrDabkowski commented Jul 18, 2017

@Kronuz Great job! It's great you also included the tests :) I tested my parser mostly as a part of my Js2Py Js interpreter on the ECMA 5.1 test suite. I will link your parser from the readme so that it's easier to find for people that need ECMA 6 parsing support.

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

No branches or pull requests

3 participants