Sebastian McKenzie
9f8e8d96a8
simplify hasParans for NewExpression
2014-11-03 12:15:57 +11:00
Sebastian McKenzie
6d961c1857
faster traverse.hasType with array of nodes
2014-11-03 12:15:27 +11:00
Sebastian McKenzie
e13a650d05
remove IfStatement making consequent and alternate blocks
2014-11-03 11:17:36 +11:00
Sebastian McKenzie
3cd7ed69a3
remove useless blank template
2014-11-03 11:16:48 +11:00
Sebastian McKenzie
93c6d69e21
make transformation tests ignore whitespace
2014-11-03 11:15:06 +11:00
Sebastian McKenzie
57d3c836bd
register: add additional blacklistTests
2014-11-03 11:14:52 +11:00
Sebastian McKenzie
115282d57b
generator: add _push method to simplify buffer pushing and location tracking
2014-11-03 11:13:37 +11:00
Sebastian McKenzie
72d924d85b
generator: fix NewExpression arguments
2014-11-03 11:12:30 +11:00
Sebastian McKenzie
6838062279
move util.errorWithNode to File
2014-11-03 11:11:37 +11:00
Sebastian McKenzie
bc79cec15a
add NewExpression support to needsParans
2014-11-03 11:11:07 +11:00
Sebastian McKenzie
85f0f6fb14
add whitespace option and move util.errorWithNode to File
2014-11-03 11:09:58 +11:00
amsul
ddbb522392
Updated blacklist option to replace reference
2014-11-01 19:36:10 -04:00
amsul
288cfd1f00
Added ability to register 6to5 with a blacklist
...
Currently, to achieve this, I have to use this workaround:
```js
var to5 = require('6to5')
delete to5.transform.transformers.generators
require('6to5/register')
```
After this simple change, I can make it much nicer:
```js
require('6to5/register')({
blacklist: ['generators']
})
```
Cheers!
2014-11-01 14:15:52 -04:00
Sebastian McKenzie
435b9434ea
don't mess with the indentation of TemplateElements
2014-11-01 23:26:48 +11:00
Sebastian McKenzie
2409b017db
generator: remove parans around ConditionalExpression
2014-11-01 23:08:50 +11:00
Sebastian McKenzie
99f2864048
generator: remove redundant print call
2014-11-01 23:08:33 +11:00
Sebastian McKenzie
5351057557
generator: move BlockStatement to base generator
2014-11-01 23:08:16 +11:00
Sebastian McKenzie
1a5ee7d5da
change acorn-jsx to acorn-6to5
2014-11-01 23:07:53 +11:00
Sebastian McKenzie
ebea86c527
split up types.ensureBlock into types.toBlock
2014-11-01 23:07:34 +11:00
Sebastian McKenzie
bf58004947
generator: add intelligent whitespace based on tokens on nodes in a sequence
2014-11-01 23:07:17 +11:00
Sebastian McKenzie
f0c78102ca
move template literal generators into separate file
2014-11-01 19:37:21 +11:00
Sebastian McKenzie
43ea593677
traverse.removeProperties: remove raw property
2014-11-01 19:29:17 +11:00
Sebastian McKenzie
629cea497f
move keyword method and restyle variable declarations
2014-11-01 19:29:02 +11:00
Sebastian McKenzie
9475dc681f
finish jsx generator
2014-11-01 19:28:42 +11:00
Sebastian McKenzie
6e41309ede
add err.stack test to code frame error capture
2014-11-01 19:28:35 +11:00
Sebastian McKenzie
42322e1ce7
add examples to types.needsParans tests
2014-11-01 19:27:42 +11:00
Sebastian McKenzie
400fa8ed97
remove unused ParenthesizedExpression
2014-11-01 19:27:23 +11:00
Sebastian McKenzie
07e2842226
implement array comprehension generator
2014-11-01 19:27:09 +11:00
Sebastian McKenzie
7d46b7c465
expose generator
2014-11-01 17:56:07 +11:00
Sebastian McKenzie
fcf6c9e066
generator: add isLast helper method
2014-11-01 17:53:01 +11:00
Sebastian McKenzie
a5523664fc
generator: add alternate support to IfStatement
2014-11-01 17:52:48 +11:00
Sebastian McKenzie
33f8988313
support for numeric literals with recast - fixes #117
2014-11-01 16:06:46 +11:00
Sebastian McKenzie
1d3544eadc
fix function generation spacing
2014-11-01 16:00:17 +11:00
Sebastian McKenzie
646bdfd04c
types.needsParans: add parent ExpressionStatement check for FunctionExpression
2014-11-01 15:58:44 +11:00
Sebastian McKenzie
aba9bba7db
generator: use new keyword method for keywords
2014-11-01 15:56:27 +11:00
Sebastian McKenzie
e77382582f
generator: add keyword method, remove __ident method and implement better position tracking
2014-11-01 15:56:10 +11:00
Sebastian McKenzie
bbffde374e
Merge branch 'master' into code-generator
2014-10-31 21:39:47 +11:00
Sebastian McKenzie
251e4d01c8
join together declarations in destructuring to return a single node if possible - fixes #113
2014-10-31 21:38:22 +11:00
Sebastian McKenzie
0fbf0e2a77
generator: add semicolon helper method, add optional printJoin iterator
2014-10-31 21:24:54 +11:00
Sebastian McKenzie
a5a8f08bb8
generator: implement missing node types
2014-10-31 21:23:45 +11:00
Sebastian McKenzie
d376bd3c0e
generator: remove redundant async tests
2014-10-31 21:23:31 +11:00
Sebastian McKenzie
20818b086c
generator: add support for modules
2014-10-31 21:22:56 +11:00
Sebastian McKenzie
f9ef1723a6
generator: add support for ForOfStatement
2014-10-31 21:22:43 +11:00
Sebastian McKenzie
6e7b8a14fe
remove comments in traverse.removeProperties
2014-10-31 21:22:28 +11:00
Sebastian McKenzie
622bb2e962
types: add more tests for optional paranthesis
2014-10-31 21:22:03 +11:00
Sebastian McKenzie
5c5348537d
generator: add support for method properties and computed keys and shorthand
2014-10-31 21:21:50 +11:00
Sebastian McKenzie
daced12baa
add base for TemplateLiteral generator
2014-10-31 11:51:00 +11:00
Sebastian McKenzie
11270e0803
Merge branch 'master' into code-generator
...
Conflicts:
lib/6to5/transformers/rest-parameters.js
2014-10-31 11:44:48 +11:00
Sebastian McKenzie
6696d5fcf4
fix rest parameters in arrow functions containing wrong arguments reference - fixes #11
2014-10-31 11:42:09 +11:00
Sebastian McKenzie
1f7270720f
add more type methods
2014-10-31 11:38:37 +11:00