This repository has been archived by the owner. It is now read-only.

Fix incomplete support for exponential operator #75

Merged
merged 1 commit into from Jul 17, 2016

Conversation

Projects
None yet
3 participants
@danez
Copy link
Member

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 force-pushed the danez:exponential-operator branch from 3000a91 to b10f869 Jul 11, 2016

@danez danez changed the title Incomplete support for exponential operator Fix incomplete support for exponential operator Jul 11, 2016

@danez

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member

hzoo commented Jul 12, 2016

👍

@danez danez force-pushed the danez:exponential-operator branch from b10f869 to 50817fe Jul 12, 2016

@danez danez force-pushed the danez:exponential-operator branch from 50817fe to ffae95b Jul 12, 2016

@codecov-io

This comment has been minimized.

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

3 checks passed

codecov/patch 100% of diff hit (target 97.00%)
Details
codecov/project 97.00% (+0.00%) compared to 0b62ece
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@danez danez deleted the danez:exponential-operator branch Jul 17, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.