Henry Zhu
c2d7e95e1a
add some more flow types
2016-02-04 11:07:03 -05:00
Jason
523a9d1d00
[traverse] nit
2016-02-03 17:46:34 +08:00
Jason
bbdd4aaf21
Ignore isolated paths when traversing
2016-01-23 18:39:14 +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
Henry Zhu
51dfd2237e
Internal: temporarily remove flow types
...
- Will need to investigate the issue regarding eslint/babel-eslint.
2016-01-17 17:14:57 -05: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
Jordan Klassen
0c1eddfd52
Add documentation comment for visitors.explode
2016-01-14 13:41:19 -08:00
Amjad Masad
6ce463399d
Fix evaluation bug with ||
2015-12-22 20:48:50 -08:00
Amjad Masad
a5b9afbebe
Make sure we always return when not confident
2015-12-21 02:04:16 -08:00
Amjad Masad
57b2ccdb66
Test and workaround inference bugs
2015-12-18 03:15:27 -08:00
Sebastian McKenzie
a8a58aaa07
Fix infinite recursion bug
2015-12-17 14:44:18 +00:00
Logan Smyth
afcfba2075
Only rename outer function bindings on conflict - fixes T6781
2015-12-13 15:35:28 -08:00
Amjad Masad
2a2cb4f160
Support ObjectProperty in purity check
2015-12-09 16:49:16 -08:00
Henry Zhu
14bad622f2
add second param
2015-12-07 15:20:30 -05:00
Amjad Masad
6601a6f737
Support unary expression in isPure check
2015-12-07 11:55:21 -08:00
Logan Smyth
05fc7ee05b
Merge pull request #3137 from loganfsmyth/export-all-fail-T2763
...
Set the proper parents for new node paths - fixes T2763
2015-12-06 22:15:46 -08:00
Henry Zhu
d06cfe63c2
eslint: add space-after-keywords
2015-12-06 11:30:07 -05:00
Amjad Masad
350ee82a83
add comment
2015-12-06 08:00:15 -08:00
Amjad Masad
036e90e9cc
Fix bug with evaluating an expression in it's own binding
2015-12-06 07:56:17 -08:00
Logan Smyth
f37acd293c
Set the proper parents for new node paths - fixes T2763
2015-12-05 16:16:02 -08:00
Logan Smyth
a12a116b9f
Ensure that default exports have a name before splitting them - fixes T6750
2015-12-05 15:28:48 -08:00
Logan Smyth
8efd1d71ad
Properly resolve scope from switch statement - fixes T6761
2015-12-04 09:04:25 -08:00
Logan Smyth
d71b59d0cc
Ensure we always push into a BlockStatement - fixes T3051
2015-12-02 19:41:22 -08:00
phantom10111
36ebe0c939
Fix static class properties in class expressions and anonymous default exported classes - fixes T2983
2015-12-01 17:59:53 +01: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
688dcec6a3
fix queueing of nested paths being pushed onto the priority queue
2015-11-13 03:37:15 -08:00
Amjad Masad
46d8241caf
Use node for parent check
2015-11-11 13:30:45 -08:00
Sebastian McKenzie
d1c4945a13
clean up visitor verification
2015-11-08 06:03:11 -08:00
Sebastian McKenzie
0869d321b4
clean up _verifyNodeList error messages
2015-11-08 05:33:51 -08:00
Sebastian McKenzie
b5b9794b3f
switch to symbols and add matches parent helper function to abstract out matching
2015-11-08 03:41:15 -08:00
Sebastian McKenzie
f1f42164fc
add toString to allow reflection of original traversal methods when wrapping for state
2015-11-08 03:41:00 -08:00
phantom10111
22dc8f8323
Fix scope cache returning an item that was just inserted
2015-11-07 23:09:54 +01:00
phantom10111
e0f1bd76cb
Fix clearNode clearing all properties instead of just symbols
2015-11-07 23:09:50 +01:00
Sebastian McKenzie
0370402a0d
fix lint errors
2015-11-06 20:55:05 -05:00
Sebastian McKenzie
bb1703e1a1
add header comment for scope cache function
2015-11-06 20:53:12 -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
63cd3008d2
clean up parameter names in Scope constructor
2015-11-06 20:42:16 -05:00
Sebastian McKenzie
8dd292075a
clean up scope cache
2015-11-06 20:39:16 -05:00
Sebastian McKenzie
f4fe578a6c
add node existence check to NodePath#has - fixes #2800
2015-11-04 23:38:14 +00:00
Sebastian McKenzie
59ecfecb9e
fix indentation and skip check for references that are inside the function we're checking execution status against
2015-11-03 04:17:38 +00:00
Sebastian McKenzie
8ec3e16794
fix remaining outer binding identifier issues
2015-11-03 03:13:39 +00:00
Sebastian McKenzie
64a9a6027e
refactor t.getOuterBindingIdentifiers to only return the id if it's a function declaration
2015-11-03 03:05:57 +00:00
Sebastian McKenzie
e72d4508de
only use outer bindings when registering a binding to prevent retreiving function params - fixes #2615
2015-11-03 03:00:27 +00:00
Sebastian McKenzie
e62a00df50
rename NumberLiteral to NumericLiteral and RegexLiteral to RegExpLiteral
2015-11-03 01:19:35 +00:00
Sebastian McKenzie
d1d0ed901e
fix export of parameters when renaming the binding of exported functions - fixes #2753
2015-11-02 19:24:23 +00:00
Sebastian McKenzie
6ccee750e3
check for path existence before checking that it's the correct instance
2015-11-02 06:42:48 +00:00
Sebastian McKenzie
24f5ef50b0
when we encounter a different NodePath instance, ignore it and create a new one. this is going to thrash the tree and memory but npm and node module resolution is atrociously bad
2015-11-02 06:36:07 +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
6740561f91
remove comments from old node after inheriting from new one when replacing nodes - closes #2490 , closes #2489
2015-10-05 16:27:17 +01:00
Sebastian McKenzie
fa88b1c00d
abstract out scope binding rename and handle function/class cases where we can retain the name with some ~magic~ - fixes #2435
2015-09-28 02:45:00 +01:00