rspivak / slimit

SlimIt - a JavaScript minifier/parser in Python
MIT License
551 stars 94 forks source link

Removal of necessary parentheses #21

Closed hasanyasin closed 12 years ago

hasanyasin commented 12 years ago

c||(c=393); // is processed correctly as: c||(c=393); // parentheses kept.

However, in this situation:

c||(c=393,a=323,b=2321);

result is this:

c||c=393,a=323,b=2321;

causing a syntax error.

Version: slimit-0.5.5

rspivak commented 12 years ago

Thanks for the bug report. I'll look into it soon.

rspivak commented 12 years ago

Fixed in https://github.com/rspivak/slimit/commit/0f446fd6b1a0b789ce2f4fc0c0a334b6c356d3e0

To try the fix you'll have to install slimit from the master branch. Let me know if you have any other issues.

hasanyasin commented 12 years ago

I pulled, tested, it works. Wow. You are fast!

I hope it did not break anything else. I will use slimit at Mushroom, so there will be a lot of testing, for sure.

Thank you.

rspivak commented 12 years ago

You're welcome and good luck with Mushroom.