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

Test with Acorn (not Acorn-6to5) and fix issue with AssignmentPattern #281

Merged
merged 1 commit into from
Jan 29, 2016
Merged

Conversation

zjmiller
Copy link
Contributor

Acorn-6to5 is not up-to-date. After switching to Acorn, a test failed, showing that escodegen had been improperly handling AssignmentPattern.

Acorn-6to5 is not up-to-date. After switching to Acorn, a test failed, showing that escodegen had been improperly handling AssignmentPattern.
@zjmiller
Copy link
Contributor Author

When dealing with the AssignmentPattern node type, escodegen was trying to use an operator property. But AssignmentPattern doesn't have an operator property. The tests weren't noticing this because the only relevant tests (compare-acorn-es6) were using Acorn-6to5 instead of Acorn. Acorn-6to5 isn't up-to-date and it wasn't parsing these cases correctly. So two mistakes (one in escodegen and one in Acorn-6to5) were essentially canceling each other out as far as the tests were concerned. Switching to the more up-to-date Acorn resulted in the relevant tests failing.

@michaelficarra
Copy link
Member

Nice, thanks.

michaelficarra added a commit that referenced this pull request Jan 29, 2016
Test with Acorn (not Acorn-6to5) and fix issue with AssignmentPattern
@michaelficarra michaelficarra merged commit 2b8d6ed into estools:master Jan 29, 2016
@GabrielRatener
Copy link

The issue with AssignmentPattern still appears to be present in version 1.6.1

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

Successfully merging this pull request may close these issues.

3 participants