1135 Commits

Author SHA1 Message Date
Sebastian McKenzie
43e01e40f1 upgrade ava 2016-06-22 13:17:31 +01:00
Sebastian McKenzie
ec0a349ec8 support negative numeric type literals - fixes T7450 2016-06-22 13:17:27 +01:00
Sebastian McKenzie
96a7eadbe4 Merge branch 'danez-fix-flow-optional-type' 2016-06-22 12:52:55 +01:00
Sebastian McKenzie
461261b181 Merge branch 'fix-flow-optional-type' of https://github.com/danez/babylon into danez-fix-flow-optional-type
# Conflicts:
#	src/plugins/flow.js
2016-06-22 12:52:42 +01:00
Sebastian McKenzie
74ee30bfbe Merge pull request #21 from danez/test-babel
Test babel with dev babylon
2016-06-22 12:45:05 +01:00
Sebastian McKenzie
78597290ec Merge pull request #23 from danez/fix-comments
Fix leading comments added from previous node
2016-06-22 12:44:12 +01:00
Sebastian McKenzie
55d47ab7b4 Merge pull request #41 from nene/ast-spec
Document AST differences from ESTree
2016-06-22 12:43:41 +01:00
Sebastian McKenzie
4d2e1dddfb Merge pull request #10 from danez/fix-flow-arrow-spread
Fix flow plugin when flow+arrow+spread used together
2016-06-22 12:36:52 +01:00
Daniel Tschinder
f11a82c96c Adjust cloning of nodes in import/export-specifiers and obj-destructuring (#24)
The cloning caused comments that where added to the original node to be persisted into
the cloned node.
Espree/Acorn does not have any cloning, that's why it is working there.
This change omits comments when cloning, as removing the cloning
causes tests in babel to fail.
2016-06-21 09:55:15 -04:00
Sebastian McKenzie
92d45c3f6c Merge pull request #16 from danez/enable-tests
Enable deactivated tests
2016-06-21 00:03:38 +01:00
Sebastian McKenzie
8977d8c75a Merge pull request #31 from eldereal/master
Allow use react elements after yield statement
2016-06-20 22:50:36 +01:00
calebmer
a25a4ffdc1 Add JSX spread children 2016-06-19 10:48:20 -04:00
Rene Saarsoo
d7dc857bbf Document AST deviations from ESTree spec
Refs #40
2016-06-18 11:05:48 +03:00
Rene Saarsoo
dd8856d5cc Correct Options heading level in README 2016-06-18 10:30:55 +03:00
Sebastian McKenzie
ca6450b057 6.8.1 2016-06-06 19:21:21 +01:00
Sebastian McKenzie
1c48c4c9db Merge pull request #25 from gabelevi/default
Support defaults in Flow's type parameter declarations
2016-05-17 01:00:49 +01:00
Yiyuan Bai
de56e12c68 Allow use react elements after yield statement 2016-05-12 18:41:41 +08:00
Henry Zhu
21c4b4d779 6.8.0 changelog (#27) 2016-05-04 10:05:58 -04:00
Henry Zhu
6ef4a731b7 6.8.0 2016-05-04 10:04:32 -04:00
Henry Zhu
d4cd0bf7b7 Actually remove it.. 2016-05-02 22:44:50 -04:00
Henry Zhu
c81db57b03 Remove unused file
Ref f81c281fc4 (commitcomment-17331315)
2016-05-02 22:43:47 -04:00
Gabe Levi
fe5193a40a Support defaults in Flow's type parameter declarations
The primary goal of this commit is to add the ability to parse type parameter
declarations with defaults, like `type Foo<T = string> = T`. While I was in the
code, I fixed a few small things, like

* Type parameter declarations need 1 or more type parameters.
* The existential type `*` is not a valid type parameter.
* The existential type `*` is a primary type
* The param list for type parameter declarations now consists of
  `TypeParameter` nodes
2016-04-27 16:12:10 -04:00
Daniel Tschinder
4bfececdad Fix leading comments added from previous node
This fixes an issue that comments were added as leading comments
to expressions, which are not immediately folowing the comment.
This was also reported and fixed in espree, and is basically a port to
babylon. eslint/espree#256

this also fixes an issue in babel-eslint with certain rules babel/babel-eslint#289
2016-04-23 12:24:20 +02:00
Daniel Tschinder
91b818d486 Add Makefile that makes it able to test babel with current babylon 2016-04-17 22:16:15 +02:00
Daniel Tschinder
e6c11a0673 Fix support for flow optional parameters in arrow functions T7096
This overwrites the conditional handling in babylon for flow to support
optional parameters in arrow functions.
2016-04-10 13:06:48 +02:00
Sebastian McKenzie
b926e401c6 Merge pull request #17 from zenparsing/master
Parse for-await statements when asyncGenerators plugin is active
2016-04-05 18:42:44 +01:00
Kevin Smith
f81c281fc4 Parse for-await statements when asyncGenerators plugin is active 2016-04-05 13:33:49 -04:00
Daniel Tschinder
bb6586d1e6 Enable deactivated tests, as it seems they work now 2016-04-04 18:22:10 +02:00
Daniel Tschinder
d15a2310cd Fix flow plugin when flow+arrow+spread used together
The fix includes creating a new method on the parser called `parseArrow`.
This new function by default only checks if current position matches an
arrow. If it does returns the `node` otherwise `undefined`.
The flow plugin can then extend this function and correctly parse the typeAnnotation
and add it to the node.

With this change, in the flow plugin there is no need anymore to extend
`parseParenAndDistinguishExpression` and the arrow handling in `parseParenItem`
could also be removed, because it is all handled now in `parseArrow`.

Some existing tests were failing, because `extra->parentesized` is now missing,
but this is correct as it is now inline with parsing without flow annotation. No extra
is added for arrow function without type annotations.

In the expression-parser `this.next()` was replaced by a more specific
`this.expect(tt.parenL)`.
2016-04-04 18:10:58 +02:00
Sebastian McKenzie
8b150813f5 Merge pull request #12 from shuhei/parameter-decorators
Parse parameter decorators
2016-03-28 22:14:15 +01:00
Shuhei Kagawa
29a6578658 parse parameter decorators 2016-03-25 14:04:33 +09:00
Sebastian McKenzie
6b14e4cb91 Merge pull request #2 from babel/travis-badge
Add travis badge
2016-03-10 14:57:01 +00:00
Sebastian McKenzie
695109d505 t push
Merge branch 'master' of github.com:babel/babylon
2016-03-10 14:48:51 +00:00
Sebastian McKenzie
2115a28b40 add lodash to dev deps 2016-03-10 14:48:46 +00:00
Henry Zhu
e31dd18750 Add travis badge 2016-03-10 09:45:41 -05:00
Sebastian McKenzie
b75f175863 Merge pull request #1 from babel/hzoo-patch-1
don't ignore compiled files
2016-03-10 13:31:47 +00:00
Henry Zhu
a47286ba2b don't ignore compiled files 2016-03-10 08:28:33 -05:00
Sebastian McKenzie
64ff4c3561 first commit 2016-03-10 06:24:44 +00:00
Amjad Masad
f8e33840b0 v6.7.0 2016-03-08 16:52:45 -08:00
Amjad Masad
6b498d7e5a Merge pull request #3323 from divmain/master
Source-map support for multiple input source files
2016-03-07 11:57:59 -08:00
Dale Bustad
bb4919500c Attach filename property to node.loc when provided. 2016-03-07 02:47:28 -08:00
Sam Goldman
b85d6c7e4a Add support for Flow def-site variance syntax
This syntax allows you to specify whether a type variable can appear in
a covariant or contravariant position, and is super useful for, say,
Promise.

Right now this is hacked in jankily, but in the next major release we
should stop using Identifier nodes for type parameters.
2016-03-06 14:44:09 -08:00
Henry Zhu
6adbe96bf1 v6.6.5 2016-03-04 18:16:17 -05:00
Amjad Masad
aca8010438 Remove remaining @flow annotations 2016-03-03 15:10:59 -08:00
Amjad Masad
b5315d4b27 Revert "Remove Flow annotations and pragmas"
This reverts commit 4252244d06b225ab26a02d52c04f9940a3e4d6a2.
2016-03-03 15:03:55 -08:00
Amjad Masad
9a180797c0 Revert "Remove flow"
This reverts commit 2827ff6b01dcce69e9d3c0402e96b52b3a2a47ee.
2016-03-03 14:49:20 -08:00
Henry Zhu
5b7fa17cbe v6.6.4 2016-03-02 16:29:17 -05:00
Sam Goldman
d6ee428857 Remove flow 2016-03-01 22:33:30 -08:00
Henry Zhu
48e8db2247 v6.6.0 2016-02-29 16:12:12 -05:00
Sam Goldman
08249b29e4 Remove weird codemod artifact 2016-02-28 13:23:28 -10:00