Christopher Chedeau
0192d58bc5
Preserve the way numbers were written ( #257 )
...
The goal of the pretty printer is to make sure that the indentation is correct, not to dictate how numbers should be written :)
2017-01-16 23:01:51 -05:00
James Long
00fad62c91
Regenerate snapshots
2017-01-11 10:16:38 -05:00
James Long
a4643f1bae
Add special case for comment at top of file; regenerate snapshots
2017-01-09 21:49:26 -05:00
James Long
892d070313
Only allow ArrowFunctionExpression types to break themselves in CallExpression's if they using a block
2017-01-09 14:01:14 -05:00
James Long
bcd44b4368
Keep blank lines from original source
2017-01-09 09:46:09 -05:00
James Long
898009ba66
Consistently print function parameters the correct way
2017-01-04 16:52:49 -05:00
James Long
588c8ce7cd
Add conditionalGroup to allow manually specifying multiple representations of a document; use it to support expanding last parameter of functions
2017-01-04 15:24:10 -05:00
James Long
37601b0a86
Update snapshots
2017-01-01 20:20:45 -05:00
James Long
c9e24eb477
Add spaces around certain statements, add --write option, and more
2016-12-30 23:01:07 -05:00
James Long
11a01552a4
Lots of bug fixes (will do smaller commits from now on)
2016-12-30 00:01:44 -05:00
James Long
88dc2681f6
Make all tests pass the crash test and fix a few more bugs
2016-12-27 21:40:04 -05:00
James Long
9acd34d67d
update snapshots
2016-12-27 13:29:31 -05:00
Christopher Chedeau
cf45afba61
Add testing
...
- This brings in the flow test suite that contains a ton of JavaScript parsing edge cases
- This creates snapshot tests using the pretty printer for all of them
- If uncomment `RUN_AST_TESTS` line in `tests/run_specs.js`, it checks ast(pretty_print(x)) == ast(x). Right now, "178 failed, 197 passed, 375 of 377 total". So half of the tests are not passing, most of them are crashes and many of the rest are subtle issues.
2016-12-23 19:51:53 +00:00