Logan Smyth
abb9618e8c
Drop array support from endsWith.
2016-07-05 19:44:51 -07:00
Logan Smyth
d6b1e36d49
Make the 'catchUp' call implicit to source location updates.
2016-07-04 22:49:58 -07:00
Logan Smyth
3680d10b6f
Centralize position tracking into buffer.
2016-07-04 22:42:28 -07:00
Logan Smyth
4286cb4f2a
Explicitly label standalone tokens and words.
2016-06-16 22:00:23 -07:00
Logan Smyth
22e2c88269
Drop the unneeded noIndent function param.
2016-06-16 22:00:23 -07:00
Logan Smyth
8336aa52e8
Split all of the separators into functions.
2016-06-16 20:31:19 -07:00
Logan Smyth
315c075419
Remove the unnecessary push/_push division.
2016-06-16 20:31:19 -07:00
Logan Smyth
528128f62d
Avoid looking for raw values for all nodes.
2016-06-16 20:31:19 -07:00
Logan Smyth
710f151d31
Use the standard space helper for comment space.
2016-06-16 20:31:19 -07:00
Logan Smyth
680fcc16d7
Standardize on .endsWith
2016-06-16 20:31:19 -07:00
dlwalsh
829d4497c9
remove micro modules in favour of lodash functions ( #3500 )
2016-05-15 22:00:50 -04:00
Logan Smyth
f6be6e0bd4
Merge pull request #3463 from loganfsmyth/sourcemap-rework
...
Support more fine-grained source location tracking and use it for functions
2016-04-20 18:57:18 -07:00
Logan Smyth
ca8556e36f
Let function optimize better by using a boolean.
2016-04-19 19:36:11 -07:00
Logan Smyth
dc92a16e7f
Fast path for newline processing.
2016-04-19 18:59:32 -07:00
Logan Smyth
76bb1dffaa
Track sourcemap location on a stack - fixes T7255
2016-04-11 01:54:40 -07:00
Amjad Masad
3667527d04
Revert "Remove flow"
...
This reverts commit 2827ff6b01dcce69e9d3c0402e96b52b3a2a47ee.
2016-03-03 14:49:20 -08:00
Sam Goldman
2827ff6b01
Remove flow
2016-03-01 22:33:30 -08:00
Jason
28ca3f7f3a
[generator] bug fix
...
- Fix Whitespace with empty token list
- Force a newline for line comments in concise mode
2016-02-17 13:01:54 +08:00
Sebastian McKenzie
5b89849f43
Switch to klint, fix some lint rules
2016-02-14 23:25:14 +00:00
Jordan Klassen
8fd329a2f4
Remove "Node" class from generator, just use module
...
The Node class was unused as a class
2016-02-03 16:51:10 -08:00
Sebastian McKenzie
65a4c8f4a4
Merge branch 'source-map-reenter' of https://github.com/kpdecker/babel into kpdecker-source-map-reenter
...
Conflicts:
packages/babel-generator/src/printer.js
2016-01-18 18:36:57 +00:00
Amjad Masad
0d8e5a9e86
Fix over-parenthesizing of function expressions
2015-12-24 14:55:51 -08:00
kpdecker
9e382b1686
Fix aux comment termination in lists and calls
2015-12-18 01:37:26 -06:00
kpdecker
94e7e4da8e
Update source map handling to be reentrant
...
Rather than repeating the original location when we exit a node, we need to restore the previous parent’s original line location, since the source map format denotes the start location.
2015-12-18 01:11:32 -06:00
Amjad Masad
cb03a98b65
Add minified format option
...
As a follow up from #3145 we agreed to add a new format that is a
superset of the compact format option. Do things that are considered
dangerous. e.g. not printing semicolons, or print literal values
as opposed to raw values.
2015-12-09 17:34:23 -08:00
Amjad Masad
b8f5ca4ff0
Merge pull request #3145 from babel/always-print
...
Always print strings for consistency
2015-12-07 14:12:32 -05:00
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
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
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
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
a639bffcd6
clean up auxiliaryComment
2015-11-03 02:46:00 +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