91 Commits

Author SHA1 Message Date
Amjad Masad
4b99d18ea7 Only reprint in compact mode 2015-12-07 10:59:50 -08:00
Amjad Masad
5b5cd761df fix logical expression 2015-12-07 10:38:14 -08:00
Amjad Masad
19daae6d96 Don't print on throw statements with sequence exprs 2015-12-07 02:48:11 -08:00
Amjad Masad
8689d1a045 Never print comments in compact mode 2015-12-07 02:37:53 -08:00
Amjad Masad
89e6d5bc7e Always print strings for consistency 2015-12-07 02:30:14 -08:00
Henry Zhu
6082ac8a59 skip nested new expressions 2015-12-05 14:19:31 -05:00
Henry Zhu
21f76655ad account for parent NewExpression with arguments 2015-12-05 13:37:06 -05:00
Henry Zhu
8a1ad5350c Merge pull request #3111 from amasad/new
No need for parens for new expressions without args
2015-12-05 13:33:23 -05:00
Amjad Masad
9c20ace184 Add support for null literal type 2015-12-03 23:58:25 -08:00
Amjad Masad
54a2a47030 Fix spacing in binary expression when right is a binary expression and has a unary on the left 2015-12-01 10:37:58 -08:00
Amjad Masad
c78c27a8d6 It's only valid if the node is the callee 2015-11-24 19:24:05 -08:00
Amjad Masad
486d781be3 Handle member expressions 2015-11-24 19:20:06 -08:00
Amjad Masad
f1f6c820fe Handle new X()() 2015-11-24 19:12:24 -08:00
Amjad Masad
d32fae6fcd No need for parens for new expressions without args 2015-11-24 19:07:03 -08:00
Amjad Masad
e481c5b570 use + instead of template string 2015-11-24 19:01:12 -08:00
Amjad Masad
e4c5d9dcb3 Respect compact mode in spacing 2015-11-24 19:01:12 -08:00
Amjad Masad
44d5552840 Fix up semicolon omission in compact mode 2015-11-23 21:32:44 -08:00
Sebastian McKenzie
f8c2beb9d8 Merge pull request #3088 from kpdecker/terminal-after-comment
Output auxiliaryCommentAfter before trail comment
2015-11-17 23:01:32 -08:00
Amjad Masad
1612c70c10 Take the alternate existence into account 2015-11-17 19:16:19 -08:00
Amjad Masad
35e575cf93 Print a block when encountering consequents that are if statements 2015-11-17 19:07:20 -08:00
kpdecker
1286200712 Output auxiliaryCommentAfter before trail comment
Quick fix for the case where generated comment is the terminal leaf in a subtree that is followed by a trailing comment.

Partial for #3034
2015-11-16 20:59:24 -06: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
kpdecker
488f5a067e Avoid duplicate auxiliary start if in aux section
Fixes #3032
2015-11-13 13:43:23 -06:00
Sebastian McKenzie
9d8db74517 only infer whitespace when we've been passed tokens 2015-11-13 03:37:27 -08:00
Sebastian McKenzie
139a61e50d account for integers with decimal 0 - fixes #3002 2015-11-11 22:11:47 -08:00
Henry Zhu
99284822f3 babel-generator: ignore if TemplateLiteral - fixes #2821 2015-11-07 19:55:36 -05:00
Paolo Moretti
232bf76b4d preserve original indentation in template literals, fixes #2613 2015-11-03 18:05:26 +00:00
Sebastian McKenzie
7dc1b4e7e9 add ExistentialTypeParam - fixes #2587 2015-11-03 13:48:03 +00:00
Sebastian McKenzie
cdeff2fbb1 simplify parentheses logic and properly parenthesise unaries - fixes #2711 2015-11-03 10:49:24 +00:00
Sebastian McKenzie
a639bffcd6 clean up auxiliaryComment 2015-11-03 02:46:00 +00:00
Sebastian McKenzie
e62a00df50 rename NumberLiteral to NumericLiteral and RegexLiteral to RegExpLiteral 2015-11-03 01:19:35 +00:00
Sebastian McKenzie
370b7913b4 add ArrowFunctionExpression parentheses logic 2015-10-30 22:51:02 +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
f88cc9d509 clean up babel-generator - closes #2210 2015-10-05 16:37:37 +01:00
Sebastian McKenzie
227ed5638a add flow type annotations 2015-09-23 16:10:44 +01:00
Sebastian McKenzie
c99a179401 var -> let 2015-09-18 18:45:55 +01:00
Sebastian McKenzie
f33c96c276 make export default anoynmous class/function statements - fixes #2205 2015-09-01 05:34:11 +01:00
Sebastian McKenzie
15f73b4fc3 remove noisy comments/documentation 2015-09-01 04:56:03 +01:00
Sebastian McKenzie
8d7b3c462f unoverload Literal AST node 2015-09-01 04:49:16 +01:00
Sebastian McKenzie
a4a347b4f0 Merge branch 'master' into development
Conflicts:
	packages/babel/src/generation/generators/flow.js
	packages/babel/src/generation/generators/types.js
	packages/babel/src/transformation/transformers/es6/for-of.js
	packages/babel/src/traversal/path/inference/inferers.js
	packages/babel/src/types/index.js
	packages/babel/src/util.js
	packages/babel/test/util.js
2015-08-15 19:50:34 -04:00
Sebastian McKenzie
3ef9bffcc2 split up babel core into multiple modules 2015-08-11 17:40:59 +01:00