* Add support for class private methods
This commit adds parser support for the TC39 Stage 2 Private Methods
proposal.
This commit also changes "key" in ClassPrivateProperty from an
Identifier to a PrivateName, as well as disallowing #constructor as a
valid private field name.
* Add tests for string literal get/set/async
These should be treated as regular methods and not special get/set/async
behaviour.
* Add tests for class private methods
This also removes a test from the Test262 whitelist that failed before
the changes for private methods support and now passes.
* Modify class private prop tests for PrivateName
* Add class private prop tests for #constructor
* Fix existing ASI test case failure
* Distinguish between ternary's : and arrow fn's return type
* Correctly parse nested arrow functions inside conditional expressions
Defer the conversion of arrow function parameters to assignable nodes so that
it is possible to use the (invalid) ast to get the exact position of the (wrong)
arrow functions.
* Check params of arrow fns w/ type params or w/o return type
* Fix also async functions
* Add test from prettier
https://github.com/prettier/prettier/issues/2194
* Don't check arrow params if they are valid at the first attemp
* Use state instead of relying on the "noArrowParamsConversion" parameter
* Remove noArrowParamsConversion
* Add support for declare export
* Do not allow declare module inside declare module
* Reallow module exports outside module
* Add handling of `declare export default`
Add check for multiple module.export declarations
* Disallow export let/const/type
Refactor parsing object properties to share more code and add support
for getters and setters
* Rename tests
* Update test fixtures
* Optimize for performance
* disallow declare export interface outside of module
* Refactor code to be more readable and less lookahead
* Add comments
* Add test for export star as
* Test for number literal getter/setter
* Add more tests
* Fix tests
* Allow union types and correctly eat semi after type
* Use non computed keys
* Fix tests
* Add support for flow type spread
* Broaden spreadable types from primary to all, more tests
* Eliminate variance sigil for type spreads, better errors, fix tests
* master:
Upgrade flow to 0.41
Throw error if new.target is used outside of a function (#402)
Fix watch command (#403)
Update yarn lock
Fix parsing of class properties (#351)
# Conflicts:
# src/parser/statement.js
# test/fixtures/experimental/class-constructor-call/illegal-key/options.json
* Fix negative number literal typeannotations
Also use parseLiteral() to parser string and number literal typeannotations
so that future changes (estree) to literals are also reflected to flow.
* Instead of invalid fallthrough throw immediately
* Increase coverage and better error mesage
* [Flow] Function predicate declaration
The accepted syntax for function declarations is extended to allow
the following predicate declaration:
FunctionReturnType :=
Type
Predicate
Type Predicate
Predicate :=
%checks
%checks ( ConditionalExpression )
* [Flow] Minor tweaks and more examples to function predicates
* [Flow] Clean-up and better message for function predicates
* [Flow] Adding abstract function predicate example
* [Flow] Rearranging the `predicate` field to ease babel generator.