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

Support for ES7 async #630

Closed
Xiot opened this issue Mar 4, 2015 · 3 comments
Closed

Support for ES7 async #630

Xiot opened this issue Mar 4, 2015 · 3 comments

Comments

@Xiot
Copy link
Contributor

Xiot commented Mar 4, 2015

I have enabled the ES7 style async / await using babeljs and I've noticed that js-beautify doesn't like it too much.

the line

async function(){
}

gets 'beautified' into

async
function() {
}

which breaks compilation.
I haven't looked through the source yet, but is that a way to keep the async on the same line?

@bitwiseman
Copy link
Member

wow, ES7? PR welcome, but ... ES6 isn't even final yet is it?

@Xiot
Copy link
Contributor Author

Xiot commented Mar 5, 2015

ES6 is almost finalized and I like to stay ahead. Also promises are so much
nicer with async / await. I should be able to take a look at it this
weekend.
Since I haven't looked through the code yet you have any pointers on where
to start?
On Mar 4, 2015 4:45 PM, "Liam Newman" notifications@github.com wrote:

wow, ES7? PR welcome, but ... ES6 isn't even final yet is it?


Reply to this email directly or view it on GitHub
#630 (comment)
.

@bitwiseman
Copy link
Member

Look at this commit:
b5426a8

NOTE: testjsbeautifier.py and beautify-javascript-tests.js are generated from test/data/javascript.js. Add tests to the data file and the code will be generated for both python and js implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants