Henry Zhu
c2d7e95e1a
add some more flow types
2016-02-04 11:07:03 -05:00
Amjad Masad
4f82506711
Merge pull request #3294 from babel/with-body
...
WithStatements can have statements as bodies
2016-01-22 14:18:10 -08:00
Amjad Masad
2110f530ea
WithStatements can have statements as bodies
...
For example try: `with({x: 1}) console.log(x);`
2016-01-20 20:48:31 -08:00
Amjad Masad
6b47447e7a
UnaryExpressions are never not prefix
...
If you look at the spec https://github.com/babel/babel/blob/master/doc/ast/spec.md#unaryexpression
All unary expressions are prefix. We should deprecate this field. But for now let's just default it true.
2016-01-20 19:02:04 -08:00
Amjad Masad
1264709226
Merge pull request #3274 from babel/fix-function-decl
...
Method names should not be bound to body
2016-01-18 10:57:19 -08:00
Sebastian McKenzie
65a4c8f4a4
Merge branch 'source-map-reenter' of https://github.com/kpdecker/babel into kpdecker-source-map-reenter
...
Conflicts:
packages/babel-generator/src/printer.js
2016-01-18 18:36:57 +00:00
Amjad Masad
95c93dd22b
Method names should not be bound to body
...
As an artificat of compiling methods to named function expressions the
function name is being considered a "local" binding in the function
body. This means that we will throw errors anytime someone would want to
create a new local binding with the same name.
This is solved by assigning a symbol to function Identifiers that
indicates that they should not be considered local bindings.
2016-01-17 13:19:37 -08:00
Jesse McCarthy
0f85e79f67
Add ArrayExpression.elements.default.
2016-01-12 11:33:08 -05:00
Amjad Masad
6abee425d3
Revert "babel-types: add Binary alias to AssignmentExpression definition (fixes T6887)"
...
This was causing problems with parenthesizing assignment expression
This reverts commit b5cf529d6b342b3dd8dd49c50cc9cd5fed4fc5a7.
2016-01-06 15:59:39 -08:00
Amjad Masad
06545e6f70
Merge pull request #3217 from babel/hzoo-patch-1
...
`babel-types`: add `Binary` alias to `AssignmentExpression` definitio…
2016-01-05 16:26:02 -06: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
Henry Zhu
b5cf529d6b
babel-types: add Binary alias to AssignmentExpression definition (fixes T6887)
2016-01-01 14:44:28 -05: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
Sebastian McKenzie
e5e085a567
Merge pull request #3195 from babel/hzoo-patch-1-1
...
validate: allow JSXText node in JSXElement children property
2015-12-27 20:30:32 +00:00
Henry Zhu
2befeb0657
remove validation for StringLiteral in JSXElement children property
2015-12-24 15:53:43 -05:00
Sam Goldman
5cfec9d8ca
Add mixins to the class declaration visitor
2015-12-24 10:31:03 -05:00
Sam Goldman
32c03222bf
Add support for this type to Babel 6.x
2015-12-23 13:54:57 -05:00
Henry Zhu
aa2cc907ea
validate: allow JSXText node in JSXElement children property (fixes T6876)
2015-12-22 09:35:14 -05:00
Amjad Masad
57b2ccdb66
Test and workaround inference bugs
2015-12-18 03:15:27 -08:00
kpdecker
3791491b79
Strip location information from import remaps
...
Fixes https://phabricator.babeljs.io/T6851
2015-12-18 01:36:24 -06:00
Marshall Roch
8b55f4dfc2
Upgrade to flow 0.20.0
2015-12-17 12:49:48 -08:00
James Kyle
2141406c86
Add Expression alias to BindExpression
2015-12-15 23:37:29 -08:00
Sebastian McKenzie
d8445e0e78
Merge pull request #2933 from ForbesLindesay/babel-types-docs
...
Generate documentation for babel-types
2015-12-12 01:33:48 +11:00
Amjad Masad
cbc37bfb2c
do-while takes a statement
...
see http://www.ecma-international.org/ecma-262/6.0/#sec-iteration-statements
2015-12-09 18:37:02 -08:00
Amjad Masad
37797c4d50
Test name, and remove todos
2015-12-04 00:12:37 -08:00
Amjad Masad
9c20ace184
Add support for null literal type
2015-12-03 23:58:25 -08:00
phantom10111
11a8086432
Make ArrayExpression validator accept nulls as holes in the array
2015-11-25 23:39:35 +01:00
Henry Zhu
d0f63c1a7b
add validators for TemplateLiteral and ArrayExpression
2015-11-25 23:10:27 +01:00
phantom10111
8186510b5d
Add validators to CallExpression and SequenceExpression
2015-11-25 23:09:13 +01:00
James Kyle
86287a7a8c
Add ObjectMember abstract type
2015-11-24 15:00:04 -08:00
Henry Zhu
f56af90c20
add numericliteral
2015-11-21 22:50:21 -05:00
Henry Zhu
3a05513e31
literal to stringLiteral - fixes T6667
2015-11-21 22:25:21 -05:00
Henry Zhu
efa9a1abf2
add more validation for jsx nodes
2015-11-21 21:13:09 -05: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
Joshua Searles
750fca9a88
Add module operator
2015-11-15 02:44:43 -05:00
Amjad Masad
6825846c82
Use Symbol.for
2015-11-11 11:06:47 -08:00
Amjad Masad
ed4a5fb811
get rid of _let
2015-11-11 10:42:55 -08:00
Sebastian McKenzie
28a13bd400
add missing babel-types constants file
2015-11-10 02:54:38 -08:00
ForbesLindesay
5f1329ef5a
Fix lint error
2015-11-10 10:38:46 +00:00
ForbesLindesay
4f9bff0c6b
Generate documentation for babel-types
2015-11-10 10:34:36 +00:00
Sebastian McKenzie
a59e5eecc8
fix cyclic dependency issue in babel-types
2015-11-10 00:16:52 -08:00
Henry Zhu
ce5b27fed8
babel-types: add validators for core
2015-11-09 17:56:21 -05:00
Henry Zhu
d4a1127012
babel-types: add validators for es2015 exports
2015-11-09 13:54:36 -05:00
Nicolas Gilbert
3eec81763f
Fix wrong assertion type on es2015 type definitions
2015-11-09 21:12:05 +13:00
Sebastian McKenzie
59759f28bb
add Expression alias to TypeCastExpression - fixes #2889
2015-11-08 05:40:05 -08:00
Sebastian McKenzie
8280e18ed4
remove force inheriting of symbols from t.inherits
2015-11-08 03:40:41 -08:00
Sebastian McKenzie
0370402a0d
fix lint errors
2015-11-06 20:55:05 -05:00
Sebastian McKenzie
e80c206591
clear and inherit all symbols and underscore propertes in t.inherits and traverse.removeProperties
2015-11-06 20:52:59 -05:00
Sebastian McKenzie
7dc1b4e7e9
add ExistentialTypeParam - fixes #2587
2015-11-03 13:48:03 +00:00