1155 Commits

Author SHA1 Message Date
Gabe Levi
22374b6bec [Flow] Arrow function type parameter declarations 2016-06-24 10:34:09 -07:00
Sebastian McKenzie
f30f1942b6 Merge pull request #55 from vkurchatkin/gen-getset
flow: allow generic method with name get or set
2016-06-24 18:24:27 +01:00
Vladimir Kurchatkin
f0c7660980 move logic to flow plugin 2016-06-24 20:23:02 +03:00
Vladimir Kurchatkin
d5f75cb2f0 flow: allow generic method with name get or set 2016-06-24 19:47:30 +03:00
Sebastian McKenzie
cde17b33bd Merge branch 'master' of github.com:babel/babylon 2016-06-22 15:28:24 +01:00
Henry Zhu
3f266691a8 fix ast links again [skip ci] 2016-06-22 09:54:05 -04:00
Sebastian McKenzie
59537a473b Merge pull request #50 from jmm/ast-spec-link
Fix link to AST spec
2016-06-22 14:49:06 +01:00
Jesse McCarthy
6dac2afd43 Fix link to AST spec
[ci skip]
2016-06-22 09:46:26 -04:00
Sebastian McKenzie
cf6e0d365e rename parser context types 2016-06-22 14:06:58 +01:00
Henry Zhu
c8e35ee70a Test on node 6, remove iojs 2016-06-22 08:58:39 -04:00
Henry Zhu
dcc3b981f9 rm extraneous text [skip ci] 2016-06-22 08:55:41 -04:00
Sebastian McKenzie
0b58ad29ab Merge pull request #46 from babel/ast-spec
Move ast spec from babel/babel [skip ci]
2016-06-22 13:54:05 +01:00
Sebastian McKenzie
b0236b8ede Merge pull request #47 from babel/hzoo-patch-1
Update Output, change links [skip ci]
2016-06-22 13:53:56 +01:00
Sebastian McKenzie
35b6c09f8f Merge pull request #45 from mathiasbynens/unicode-9
Update to Unicode v9
2016-06-22 13:53:25 +01:00
Henry Zhu
2d4c117485 Update Output, change links [skip ci] 2016-06-22 08:50:48 -04:00
Sebastian McKenzie
3524ad510f remove grouped type arrow restriction as it seems flow no longer has it - fixes #44 2016-06-22 13:43:32 +01:00
Henry Zhu
be7d968903 Move ast spec from babel/babel [skip ci] 2016-06-22 08:39:29 -04:00
Mathias Bynens
b7ed4f5d12
Update to Unicode v9 2016-06-22 14:35:19 +02:00
Sebastian McKenzie
f63802c716 add missing generate-identifier-regex script - fixes #7 2016-06-22 13:24:35 +01:00
Sebastian McKenzie
4ca3cd8d1a remove line terminator restriction after await keyword - fixes #38 2016-06-22 13:18:43 +01:00
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