-
Notifications
You must be signed in to change notification settings - Fork 11
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
Investigate switching to another js parser #20
Comments
Redoing the parser as an acorn plugins looks like a way to go. It also produces the tree in the standardized estree format, shared between multiple parser. That should also help us make a decent linter for qml. /cc @akreuzkamp, @Plaristote, @stephenmdangelo, what do you think? |
I started a very basic POC in the acorn-qml repo. |
Imo it's not worth it. As you already know, I want to use Qt's very own QML parser on the long run. Before we start any actual work on porting to another parser, I would like to have a discussion about that. In fact, there's already quite some code for that and it allows us to do quite a lot more, than just parsing (which is compiling ;)). But it also means requiring native code for pre-parsing unlike gulp-qmlweb, which "only" requires nodejs. But I don't want to stop you of course, if you feel to do so ;) I'm going to open a discussion about my approach soon. :) |
@akreuzkamp The thing is, I want to keep QmlWeb usable from the client-side only, i.e. without the help of server-side parsing. And even with the server-side parsing, it would be great if that wouldn't require compilation of a native add-on and/or installing Qt on the server =). Also, a decent parser would allow us to implement linting for Also, I'm thinking about coupling a QML parser together with Babel, that would allow to use newer ECMAScript in qml files (i.e. transforming QML with newer ECMAScript syntax to QML with supported syntax). |
Please see qmlweb/qmlweb#303 for a continuation of the discussion about the C++-based compiler. :) |
acorn+1 |
E.g. acorn or esprima.
The text was updated successfully, but these errors were encountered: