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

Fixed T6675 #3107

Merged
merged 1 commit into from Dec 11, 2015
Merged

Fixed T6675 #3107

merged 1 commit into from Dec 11, 2015

Conversation

makenowjust
Copy link
Contributor

I fixed T6675. This PR fixed the parser of directives like "use strict" because T6675 problem was caused by the bug existed there. For example, previous implementation cannot parse following code:

"use strict"
.split(" ").map(s => console.log(s))

Of course this code is correct. The factor of this problem is that it is tokens, not statements, that previous implementation uses for parsing directives. In other words, previous implementation regards "use strict" token as the directive as soon as reading this token, even if this token is one of the parts of the expression.

See ECMA-262 6th §14.1.1. I re-implement the parser of directives according to it.

@codecov-io
Copy link

Current coverage is 89.12%

Merging #3107 into master will decrease coverage by -0.05% as of 88b38cd

@@            master   #3107   diff @@
======================================
  Files          214     214       
  Stmts        15468   15461     -7
  Branches         0       0       
  Methods          0       0       
======================================
- Hit          13793   13779    -14
  Partial          0       0       
- Missed        1675    1682     +7

Review entire Coverage Diff as of 88b38cd

Powered by Codecov. Updated on successful CI builds.

sebmck added a commit that referenced this pull request Dec 11, 2015
@sebmck sebmck merged commit 0278f5a into babel:master Dec 11, 2015
@sebmck
Copy link
Contributor

sebmck commented Dec 11, 2015

Thank you @makenowjust! Sorry for the delay in merging. I've been taking a break from OSS and Babel.

@makenowjust makenowjust deleted the fix/t6675-2 branch December 12, 2015 01:41
JacopKane pushed a commit to JacopKane/babel that referenced this pull request Jan 11, 2018
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 8, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants