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

Conversation

Projects
None yet
3 participants
@zjmiller
Contributor

zjmiller commented Jan 27, 2016

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

Test with Acorn (not Acorn-6to5) and fix issue with AssignmentPattern
Acorn-6to5 is not up-to-date. After switching to Acorn, a test failed, showing that escodegen had been improperly handling AssignmentPattern.
@zjmiller

This comment has been minimized.

Show comment
Hide comment
@zjmiller

zjmiller Jan 27, 2016

Contributor

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.

Contributor

zjmiller commented Jan 27, 2016

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

This comment has been minimized.

Show comment
Hide comment
@michaelficarra

michaelficarra Jan 29, 2016

Member

Nice, thanks.

Member

michaelficarra commented Jan 29, 2016

Nice, thanks.

michaelficarra added a commit that referenced this pull request Jan 29, 2016

Merge pull request #281 from zjmiller/master
Test with Acorn (not Acorn-6to5) and fix issue with AssignmentPattern

@michaelficarra michaelficarra merged commit 2b8d6ed into estools:master Jan 29, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@GabrielRatener

This comment has been minimized.

Show comment
Hide comment
@GabrielRatener

GabrielRatener Apr 28, 2016

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

GabrielRatener commented Apr 28, 2016

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