19 Commits

Author SHA1 Message Date
Brian Ng
3a27f49c57 Fix identation with empty leading ObjectTypeProperty (#4862) 2016-11-19 10:47:41 -05:00
Henry Zhu
19bb830c50 use *, add test for assign-expression in parameter (#4865) 2016-11-19 10:45:00 -05:00
Henry Zhu
cd041541b8 Fix bug + Generate test fixtures if no expected.js (#4858) 2016-11-17 17:53:46 -05:00
Andrew Levine
9f8ab29213 Change usage of "suite"/"test" in unit-tests to "describe"/"it" (#4734)
Fixes #4733
2016-10-15 18:45:35 -04:00
Andrew Levine
c0038221d7 Run ESLint on test files, and fix lint errors in test files (#4732) 2016-10-15 18:27:48 -04:00
Moti Zilberman
03d772c2ec Computed class properties (#4500)
* Support computed class property names (#4499)

** Depends on babel/babylon#121 **

* `babel-types`: Add `computed` field to `ClassProperty`

* `babel-plugin-transform-class-properties`: handle computed property names correctly

* `babel-generator`: add tests for class properties (computed/literal, static/instance)

* doc: Update babel-types with ClassProperty.computed

* chore(package): update babylon to v6.11.0

* babel-types: move ClassProperty.computed to be last builder arg
2016-09-26 17:46:00 +02:00
Sebastian McKenzie
4a19661346 Generate names field for identifiers to get correct names mappings (#3658) 2016-08-16 13:43:55 -04:00
Sam Pepose
3ee06187d5 Fixed incorrect newlines with Flow object types (#3548) 2016-06-23 20:38:05 -04:00
Logan Smyth
d042ddfdda Clarify that the code generator class is not public. 2016-06-16 20:31:19 -07:00
Logan Smyth
81e6d4147d Map the end of block statement nodes to the end of their original location - fixes T7258 2016-04-11 01:54:41 -07:00
Logan Smyth
76bb1dffaa Track sourcemap location on a stack - fixes T7255 2016-04-11 01:54:40 -07:00
Dale Bustad
26dcd6400f When generating sourcemaps, use per-node source filename if present. 2016-03-07 02:47:27 -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
Amjad Masad
47b686b6fa Handle nested if statements with alternates in printer
Previously we saw a bug that when we have nested if statements
and an alternate then the generated code may confuse which
if statement the alternate belongs to.

e.g.

```
if (foo) if (bar) bar(); else baz();
```

But this was handled by looking at the consequent
and if it's an if we add a block. However we didn't
handle situations where it's not an if but the last
recursive statement is an if:

```
if (foo) while (bar) if (baz) baz(); else shoosh()
```

This handles it by recurring until we get the last
statement.
2015-12-17 22:41:55 -08:00
Amjad Masad
178da2f59b var 2015-12-16 12:20:49 -08:00
Amjad Masad
320cede9be Fix invalid codegen for number member expr 2015-12-15 17:47:46 -08:00
Sebastian McKenzie
5f40b53dee abstract out test runner into a module, move traceur and esnext tests to babel-preset-es2015, clean up and make existing tests more consistent 2015-11-08 21:58:01 -08: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