Sebastian McKenzie
0c37b7b973
add typeof conditional inference
2015-06-09 03:20:32 +01:00
Sebastian McKenzie
2dd8c40618
heavily simplify constants transformer
2015-06-09 00:31:18 +01:00
Sebastian McKenzie
33128b0ccf
remove unused declaration
2015-06-08 23:59:53 +01:00
Sebastian McKenzie
cf25424295
fix duplicate declaration
2015-06-08 23:49:00 +01:00
Sebastian McKenzie
7492074794
infer types of bindings inside of conditionals based on usage
2015-06-08 23:43:46 +01:00
Sebastian McKenzie
c4a491123e
disallow line terminator after async contextual keyword - fixes #1711
2015-06-08 21:25:16 +01:00
Sebastian McKenzie
55ad88fe4e
don't override types parameter
2015-06-08 14:59:19 +01:00
Sebastian McKenzie
b0971412a2
add inference for null, remove any type parameter from inferred arrays, add todo comment
2015-06-08 14:52:35 +01:00
Sebastian McKenzie
a6b374a681
save union type in _getTypeAnnotationBindingConstantViolations to prevent infinite recursion
2015-06-08 14:52:13 +01:00
Sebastian McKenzie
2d0355b3b9
merge previous bindings constantViolations and path onto new bindings constantViolations
2015-06-08 14:49:09 +01:00
Sebastian McKenzie
7fade101be
move down module TypeAlias check
2015-06-08 14:47:58 +01:00
Sebastian McKenzie
5899e9a0be
don't consider type aliases to be a default declaration - fixes #1705
2015-06-08 12:20:30 +01:00
Sebastian McKenzie
d41cb11545
fix registerDeclaration for FlowDeclarations
2015-06-08 01:46:05 +01:00
Sebastian McKenzie
6b02ca47c3
add missing semicolon
2015-06-08 01:27:02 +01:00
Sebastian McKenzie
ea1b85bffa
fix bug where templates were getting polluted with old traversal paths
2015-06-08 01:25:51 +01:00
Sebastian McKenzie
3cffe47eea
fix NodePath#isGenericType method name
2015-06-08 01:00:01 +01:00
Sebastian McKenzie
e5d5a9fb27
remove unused variable
2015-06-08 00:33:41 +01:00
Sebastian McKenzie
f4cc27bc0e
remove unused variable
2015-06-08 00:29:52 +01:00
Sebastian McKenzie
8cea575e2e
change NodePath#findParent to only call callback with path instead of node
2015-06-08 00:29:46 +01:00
Sebastian McKenzie
c91baee4d5
add support for flow declarations in scope tracking
2015-06-08 00:04:17 +01:00
Sebastian McKenzie
6c268cdf21
split out path comment methods into a separate file
2015-06-07 23:49:29 +01:00
Sebastian McKenzie
fce977f1d7
update TraversalContext#shouldVisit to check for existence of visitor keys
2015-06-07 23:38:39 +01:00
Sebastian McKenzie
a298075949
check for loc value on comments before attempting to adjust it
2015-06-07 23:37:47 +01:00
Sebastian McKenzie
66599c3779
use scope paths hub instead of manually passing the hub to the scope
2015-06-07 23:37:33 +01:00
Sebastian McKenzie
60340244b1
when constructing a NodePath, inherit parent paths hub if one wasn't passed to us
2015-06-07 23:36:32 +01:00
Sebastian McKenzie
eb72ea3e5a
rename path verification methods to introspection and add NodePath#getSource method
2015-06-07 23:36:12 +01:00
Sebastian McKenzie
ede6237b6f
add NodePath#addComment method
2015-06-07 23:35:46 +01:00
Sebastian McKenzie
e91e10aae6
add FlowStatement and FlowDeclaration alias keys
2015-06-07 23:35:35 +01:00
Sebastian McKenzie
9c3cca0d25
rename NodePath#isTypeAnnotationGeneric to isTypeAnnotation
2015-06-07 23:35:09 +01:00
Sebastian McKenzie
8eee5367f3
add Noop node
2015-06-07 23:34:35 +01:00
Sebastian McKenzie
75330304dc
fix linting errors
2015-06-07 20:04:30 +01:00
Sebastian McKenzie
e804741632
add module metadata - closes #1601
2015-06-07 19:41:20 +01:00
Sebastian McKenzie
3d3cb4be4f
completely rework type inferrence, support coercing to union types and be more reliable in the inferrence and always be cautious
2015-06-07 19:39:53 +01:00
Sebastian McKenzie
64f4209119
recurse into type casts when trying to get it's expression - fixes #facebook/react-native#1526
2015-06-07 02:45:06 +01:00
Sebastian McKenzie
2ede226ef9
remove unused variables
2015-06-06 16:35:28 +01:00
Sebastian McKenzie
f5cf641c0a
add support for async generators to type inferrence
2015-06-06 16:17:55 +01:00
Sebastian McKenzie
1abd3419f6
simplify NodePath.getScope
2015-06-06 16:17:43 +01:00
Sebastian McKenzie
75699db716
clean up options normalisation and add more comments
2015-06-06 16:17:30 +01:00
Sebastian McKenzie
7c3572f08c
fix linting errors
2015-06-06 03:38:12 +01:00
Sebastian McKenzie
9dacde6d07
further implement the concept of a "Hub" that all traversal paths get access to, also add in some assertions to confirm path state when performing manipulation
2015-06-06 03:34:08 +01:00
Sebastian McKenzie
8c3aab9a26
add support for async functions to type inferrence
2015-06-06 03:33:32 +01:00
Sebastian McKenzie
ba4550c953
switch some node-parent based stuff to path-based
2015-06-06 03:33:22 +01:00
Sebastian McKenzie
d0ac65a934
add _paths in t.inherits
2015-06-06 03:32:35 +01:00
Sebastian McKenzie
a4c70bb029
this commit makes the following changes to the way paths are handled:
...
- store paths on parents instead of containers
- implement one central hub that all traversal paths and scopes get access to in order to abstract out access to common functions
2015-06-06 03:32:22 +01:00
Sebastian McKenzie
6296f49653
update minification.constantFolding transformer to deopt bindings that are reassigned in a different function scope
2015-06-05 23:01:31 +01:00
Sebastian McKenzie
9f2b739046
improve Scope#dump to print binding info
2015-06-05 23:00:50 +01:00
Sebastian McKenzie
da1d5e5577
simplify unary resolution and move operators to types
2015-06-05 23:00:06 +01:00
Sebastian McKenzie
7333b4e392
move staticPropBody class concat to after className check in es6.classes transformer
2015-06-05 22:44:03 +01:00
Sebastian McKenzie
b0442d0784
add back shouldIgnore check that went missing around 32f19aff99559e36c3d4fbb946af378a8126b8bf - closes #1696 , fixes #1693
2015-06-05 22:43:32 +01:00
Sebastian McKenzie
295e69f8f8
fix auxiliaryComment option name for istanbul interop - fixes #1695
2015-06-05 22:40:28 +01:00