* 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
* Initial estree support for ClassMethod
* Handle literals for estree
* Fix regex
* correct output of regexp and regenerate test
* Add tests for validation stuff with estree plugin
* Parse Properties correctly
This also refactors how babylon parses obj properties in general
so that this logic can be more easily extended.
* Run all throws-tests a second time with estree plugin
* Fix all throw tests
* Remove rebase conflict
* Correctly set kind
This ensures state.inMethod gets propagated correctly
* Add computed: false to methods with ident async
* Implement directive field on Directives
* Test invalid directives
* more tests
* [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.
* 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
* Parse flow nested array type annotations like number[][]
Fixes#217.
* Do not parse a newline separated array statement into a flow type annotation
* Get rid of lineBreak dependency in flow.js in favor of higher level method
* Use .gitattributes to ignore files with weird newlines
* [Flow] Make parameter names in function types optional
* [Flow] Anonymous function types with single params can omit parens
* [Flow] Optional names for object indexer keys
* Add noAnonFunctionType explicitly to state
* Adjust gitattributes as files have been fixed