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

Fix incomplete support for exponential operator #75

Merged
merged 1 commit into from
Jul 17, 2016
Merged

Fix incomplete support for exponential operator #75

merged 1 commit into from
Jul 17, 2016

Conversation

danez
Copy link
Member

@danez danez commented Jul 11, 2016

While looking through the es2016+ table here I noticed that babel is not marked green for exponentiation (**) operator - basic support. This has to do with the parenthesis that are mandatory for prefixed literals.

So ultimately it should be like this:

5 ** 6; // success
(-5) ** 6; // success
-(5 ** 6); // success
-5 ** 6; // fail
-(5) ** 6; // fail
(-5 ** 6); // fail

But currently it is like this:

5 ** 6; // success
(-5) ** 6; // fail
-(5 ** 6); // success
-5 ** 6; // fail
-(5) ** 6; // success
(-5 ** 6); // fail

I added some currently failng tests.

@danez danez changed the title Add more testcases for exponential operator Incomplete support for exponential operator Jul 11, 2016
@danez danez added the i: bug label Jul 11, 2016
@danez danez changed the title Incomplete support for exponential operator Fix incomplete support for exponential operator Jul 11, 2016
@danez
Copy link
Member Author

danez commented Jul 11, 2016

I found a solution to fix it. Luckily we already have a lot of information about parenthesis in extra.

@hzoo
Copy link
Member

hzoo commented Jul 12, 2016

👍

@codecov-io
Copy link

codecov-io commented Jul 12, 2016

Current coverage is 97.00%

Merging #75 into master will not change coverage

@@             master        #75   diff @@
==========================================
  Files            19         19          
  Lines          2972       2972          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           2883       2883          
  Misses           89         89          
  Partials          0          0          

Powered by Codecov. Last updated by 0b62ece...ffae95b

@danez danez merged commit 9732559 into babel:master Jul 17, 2016
@danez danez deleted the exponential-operator 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

3 participants