42 Commits

Author SHA1 Message Date
Jeff Morrison
e6951e99f0 Add support for leading pipes in Flow type alias RHS syntax 2016-02-05 13:23:55 -05:00
Sam Goldman
17d19a0056 Add export interface Flow syntax support
An interface export is just like a type export. In fact, it's a syntax affordance which makes the following equivalent:

```javascript
interface I_ { ... }
export type I = I_;
```

```javascript
export interface I { ... }
```

See facebook/flow#1145
2016-01-05 15:57:45 -08:00
Sam Goldman
26c97c4069 Add support for "declare interface" Flow syntax
This has been a feature in Flow for a long time (couldn't easily find a
specific commit adding this). Interfaces are basically undocumented, though, so
it's easy to see how this was missed.
2016-01-04 11:50:12 -08:00
Sam Goldman
e764346d5f Add support for "declare type" Flow syntax
See facebook/flow#1105
2016-01-04 11:42:43 -08:00
Sebastian McKenzie
5ca1cf0506 Merge pull request #3203 from samwgoldman/flow-mixins-6.x
Add support for mixins to Babel 6.x
2015-12-27 21:04:40 +00:00
Sam Goldman
123a9596ce Add support for mixins to Babel 6.x 2015-12-23 16:09:12 -05:00
Sam Goldman
32c03222bf Add support for this type to Babel 6.x 2015-12-23 13:54:57 -05:00
Henry Zhu
d06cfe63c2 eslint: add space-after-keywords 2015-12-06 11:30:07 -05:00
Amjad Masad
9c20ace184 Add support for null literal type 2015-12-03 23:58:25 -08:00
Aliaksei Shytkin
47871f80dd Make arrow functions to work with multiple args and flow return type (fixes T2422) 2015-11-23 15:20:16 +03:00
Daniel Lo Nigro
0076204f80 Fix Flow.
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
2015-11-15 21:30:22 -08:00
Sebastian McKenzie
592193321d fix defaults on type annotated arrow function params - fixes #2493 2015-11-05 09:49:03 +00:00
Sebastian McKenzie
0e76a5ace1 fix existential type param parsing 2015-11-03 20:04:55 +00:00
Sebastian McKenzie
7dc1b4e7e9 add ExistentialTypeParam - fixes #2587 2015-11-03 13:48:03 +00:00
Sebastian McKenzie
e62a00df50 rename NumberLiteral to NumericLiteral and RegexLiteral to RegExpLiteral 2015-11-03 01:19:35 +00:00
Sebastian McKenzie
7012116f4e fix parser bug where arrow functions have a higher precedence than they should - fixes #2118 2015-10-30 22:50:53 +00:00
Sebastian McKenzie
ae7d5367f1 6.0.0
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.
2015-10-29 17:51:24 +00:00
Sebastian McKenzie
20f643b419 type annotate babylon 2015-09-23 15:59:41 +01:00
Sebastian McKenzie
061ba7b2a2 Merge remote-tracking branch 'origin/master' into development
Conflicts:
	packages/babel/scripts/build-dist.sh
2015-08-27 11:12:00 -07:00
Cesar Andreu
c44858207e Start ObjectTypeProperty's optional property as false in each loop 2015-08-27 00:07:26 -04:00
Sebastian McKenzie
a179f9a48b fix various bugs surfaced by the esprima test suite, remove some incorrect tests 2015-08-11 16:58:20 +01:00
Sebastian McKenzie
415d1271b9 add esprima tests and fix bugs picked up by it 2015-08-11 00:59:15 +01:00
Sebastian McKenzie
2afad4b7e9 forward all arguments to parseClassId in flow parser plugin 2015-08-10 13:10:32 +01:00
Sebastian McKenzie
a1ca4822dc fix handling of flow method shorthand - fixes #2169 2015-08-05 21:42:15 +01:00
Sebastian McKenzie
855ee71d59 add support for export types 2015-07-31 23:34:45 +01:00
Sebastian McKenzie
f97e201b56 fix linting error and add missing tests 2015-07-30 23:47:59 +01:00
Sebastian McKenzie
436874dac8 add support for boolean flow literals - fixes #2127 2015-07-30 23:44:36 +01:00
Sebastian McKenzie
caecebf95b make flow transformer use internal state to track whether we're in a type or not - fixes #2083 2015-07-27 00:06:26 +01:00
Sebastian McKenzie
69721b930a add token match method and remove more dead code 2015-07-26 04:48:42 +01:00
Sebastian McKenzie
2598299e64 finish reorganisation of babylon 2015-07-25 08:03:39 +01:00
Sebastian McKenzie
7e7ad89724 remove range property from nodes, clean up babylon codebase 2015-07-25 07:07:22 +01:00
Sebastian McKenzie
30be1317e6 update flow literal annotations to have a rawValue 2015-07-21 02:37:43 +01:00
Sebastian McKenzie
956fd8d770 Merge branch 'master' into development 2015-07-21 02:28:00 +01:00
Sebastian McKenzie
0a5a00d6f8 properly disallow type casts in reference lists 2015-07-21 02:01:48 +01:00
Sebastian McKenzie
40f19586af reimplement async function type parameters backfix - fixes #2028 2015-07-21 01:13:35 +01:00
Franky Chung
0876209847 Add number literal type annotations for flow 2015-07-20 11:35:46 +09:00
Sebastian McKenzie
d2ce03e82d flow parser plugin: move up startPos and startLoc default assignments 2015-07-15 20:33:56 +01:00
Sebastian McKenzie
afacd62738 rewrite async function parsing, properly parse flow return types of arrow functions - fixes #1991 2015-07-15 20:08:10 +01:00
Sebastian McKenzie
ada45d5800 add missing semicolons 2015-07-12 00:36:21 +01:00
Sebastian McKenzie
f9498d7a2d Merge branch 'master' into top-secret
# Conflicts:
#	packages/babylon/src/options.js
#	src/acorn/plugins/flow.js
#	src/acorn/src/util.js
2015-07-11 21:04:33 +01:00
Sebastian McKenzie
a226641631 more architectural changes 2015-07-11 20:56:26 +01:00
Sebastian McKenzie
fedf894904 Begin transition of Babel to a more scalable architecture, async flow to allow for RPC and better build system for multiple packages 2015-07-11 12:39:54 +01:00