Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Fix lookahead to not add comments to arrays which are not cloned #76

Merged
merged 1 commit into from
Jul 17, 2016
Merged

Fix lookahead to not add comments to arrays which are not cloned #76

merged 1 commit into from
Jul 17, 2016

Conversation

danez
Copy link
Member

@danez danez commented Jul 13, 2016

We do not clone arrays in lookahead() but comments are added to the leading/trailing arrays during lookahead. The next next() call would then add the comments again, leading to this comments being in this arrays twice.
This was showing as test failure since #42 was merged, but was not a problem introduced by this PR.

Also extracted parsing of JSXSpreadChild to own parse function.

cc @kittens @calebmer

We do not clone arrays in lookahead() but comments were added
to leading/trailing arrays during lookahead, leading to leak to the next next() call.

Also extracted parsing of JSXSpreadChild to own parse function.
@codecov-io
Copy link

codecov-io commented Jul 13, 2016

Current coverage is 96.69%

No coverage report found for master at 3fad8cc.

Powered by Codecov. Last updated by 3fad8cc...700068b

@divmain divmain mentioned this pull request Jul 17, 2016
@danez danez merged commit 88d7e20 into babel:master Jul 17, 2016
@danez danez deleted the fix-lookahead-in-spread-child branch July 17, 2016 09:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants