92 Commits

Author SHA1 Message Date
Henry Zhu
ecd294b55e fix babel-traverse issues 2016-04-25 21:52:51 -04:00
Henry Zhu
6f5e47eff0 Check if t.is is already defined (specifically accounting for the isImmutable method in validators 2016-04-24 20:06:23 -04:00
Henry Zhu
c9e5da6ad0 use named exports instead of export * as a temp workaround 2016-04-24 20:06:23 -04:00
Logan Smyth
e7796b45c9 Add a fast path for checking for exact node types.
In my unscientific tests locally, this look the time for generating
200 files down from 11.8 to 8.3 seconds.
2016-04-19 18:59:15 -07:00
Amjad Masad
60d773f370 Merge pull request #3393 from babel/cache
Move NodePath cache out of the AST
2016-03-07 13:57:47 -08:00
Amjad Masad
d5e78384ef Only export methods and not the entire cache 2016-03-07 12:50:29 -08:00
Amjad Masad
bf91a68375 Move scope cache to the cache module 2016-03-07 12:04:44 -08:00
Amjad Masad
5367d5d151 Make sure we update the cache in all the right places 2016-03-07 12:04:44 -08:00
Amjad Masad
2fbe28cc88 Remove remaining @flow annotations 2016-03-03 15:10:59 -08:00
Amjad Masad
12ee11a0a4 Revert "Remove Flow annotations and pragmas"
This reverts commit 4252244d06b225ab26a02d52c04f9940a3e4d6a2.
2016-03-03 15:03:55 -08:00
Amjad Masad
3667527d04 Revert "Remove flow"
This reverts commit 2827ff6b01dcce69e9d3c0402e96b52b3a2a47ee.
2016-03-03 14:49:20 -08:00
Logan Smyth
305252d335 Recognize object rest properties as binding identifiers - fixes T7178 2016-03-03 08:58:22 -08:00
Sam Goldman
2827ff6b01 Remove flow 2016-03-01 22:33:30 -08:00
Sam Goldman
5167d001c5 Remove @noflow as well 2016-02-28 13:25:36 -10:00
Sam Goldman
4252244d06 Remove Flow annotations and pragmas 2016-02-28 13:18:57 -10:00
Sebastian McKenzie
5b89849f43 Switch to klint, fix some lint rules 2016-02-14 23:25:14 +00:00
Logan Smyth
b53864c569 Merge pull request #3334 from loganfsmyth/bind-callee-ref
Check BindExpression callee for reference - fixes T6984
2016-02-10 22:42:50 -07:00
Logan Smyth
b13be640fa Check BindExpression callee for reference - fixes T6984 2016-02-06 22:17:46 -08:00
Logan Smyth
ccf3875a67 Fix export specifier validator. 2016-02-06 13:49:34 -08:00
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