* Use fromCodePoint to convert high value unicode entities
* Include polyfill for String.fromCodePoint
* copy and adapt fromCodePoint into String.fromcodepoint
In order to avoid modifying String as the polyfill does, I've copied
the source from the polyfill and adapted it return the polyfill
function if the native version does not exist. Once support for node
versions that lack fromCodePoint is dropped, this polyfill can be
removed.
* move license notice to top of file
* Increase test coverage
* Test for error when binding `this` in destructuring pattern
* Ignore coverage of inAsync check in parseAwait - already checked externally
* Ignore coverage of default case in checkPropClash
* Remove unused parameter isAsync from parseParenAndDistinguishExpression
* Ignore coverage of an `else` branch in flowParseTypeParameterDeclaration
* Flow: remove unused parameters to flowParseTypeAnnotatableIdentifier
* Flow: ignore coverage of pass-through throw statement in parseConditional
* Flow: Add test for error on property with type param
* Flow: ignore coverage of pass-through throw statements in parseMaybeAssign, parseArrow
* Add test for error on XML-style comment in module code
* Update test for error on method in object pattern
* Test for error: "Only '=' operator can be used for specifying default value"
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.
Removed `@flow` annotation from files that don't actually pass Flow check at the moment. These will be added back file by file once the files are properly converted to use Flow.
Closes#3064
I'm extremely stupid and didn't commit as I go. To anyone reading this
I'm extremely sorry. A lot of these changes are very broad and I plan on
releasing Babel 6.0.0 today live on stage at Ember Camp London so I'm
afraid I couldn't wait. If you're ever in London I'll buy you a beer
(or assorted beverage!) to make up for it, also I'll kiss your feet and
give you a back massage, maybe.